summary refs log tree commit diff
path: root/synapse/metrics/__init__.py
diff options
context:
space:
mode:
authorPaul "LeoNerd" Evans <paul@matrix.org>2016-10-27 18:09:34 +0100
committerPaul "LeoNerd" Evans <paul@matrix.org>2016-10-27 18:09:34 +0100
commit1cc22da6002bc12b11e2e9455143c9f16ed0f5c4 (patch)
treeb6ae0b9fb42815290f727f98db841d82a04edaf0 /synapse/metrics/__init__.py
parentPass the Metrics group into the process collector instead of having it find i... (diff)
downloadsynapse-1cc22da6002bc12b11e2e9455143c9f16ed0f5c4.tar.xz
Set up the process collector during metrics __init__; that way all split-process workers have it
Diffstat (limited to 'synapse/metrics/__init__.py')
-rw-r--r--synapse/metrics/__init__.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/metrics/__init__.py b/synapse/metrics/__init__.py
index f6c084169b..7041da25ce 100644
--- a/synapse/metrics/__init__.py
+++ b/synapse/metrics/__init__.py
@@ -24,6 +24,7 @@ from .metric import (
     CounterMetric, CallbackMetric, DistributionMetric, CacheMetric,
     MemoryUsageMetric,
 )
+from .process_collector import register_process_collector
 
 
 logger = logging.getLogger(__name__)
@@ -121,6 +122,8 @@ reactor_metrics.register_callback(
     "gc_counts", lambda: {(i,): v for i, v in enumerate(gc.get_count())}, labels=["gen"]
 )
 
+register_process_collector(get_metrics_for("process"))
+
 
 def runUntilCurrentTimer(func):