summary refs log tree commit diff
path: root/synapse/app/_base.py
diff options
context:
space:
mode:
authorBrendan Abolivier <babolivier@matrix.org>2022-09-05 12:26:43 +0200
committerGitHub <noreply@github.com>2022-09-05 10:26:43 +0000
commit898fef2789c9b1a20ef53c7d588f536f51f0fe2f (patch)
tree326f374fa50f2418f7ab13cdfc21c92da613291d /synapse/app/_base.py
parentfix grammar (diff)
downloadsynapse-898fef2789c9b1a20ef53c7d588f536f51f0fe2f.tar.xz
Share some metrics between the Prometheus exporter and the phone home stats (#13671)
Diffstat (limited to 'synapse/app/_base.py')
-rw-r--r--synapse/app/_base.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/app/_base.py b/synapse/app/_base.py
index 4742435d3b..9a24bed0a0 100644
--- a/synapse/app/_base.py
+++ b/synapse/app/_base.py
@@ -511,9 +511,10 @@ async def start(hs: "HomeServer") -> None:
     setup_sentry(hs)
     setup_sdnotify(hs)
 
-    # If background tasks are running on the main process, start collecting the
-    # phone home stats.
+    # If background tasks are running on the main process or this is the worker in
+    # charge of them, start collecting the phone home stats and shared usage metrics.
     if hs.config.worker.run_background_tasks:
+        await hs.get_common_usage_metrics_manager().setup()
         start_phone_stats_home(hs)
 
     # We now freeze all allocated objects in the hopes that (almost)