summary refs log tree commit diff
path: root/synapse/metrics/__init__.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-11-22 10:25:23 +0000
committerErik Johnston <erik@matrix.org>2016-11-22 10:25:23 +0000
commitf9834a3d1a25d0a715718a53e10752399985e3aa (patch)
tree3d868eafb43d9646b15cd1aaee0f4093db802fd3 /synapse/metrics/__init__.py
parentMerge branch 'erikj/ldap3_auth' (diff)
parentBump changelog (diff)
downloadsynapse-f9834a3d1a25d0a715718a53e10752399985e3aa.tar.xz
Merge branch 'release-v0.18.4' of github.com:matrix-org/synapse v0.18.4
Diffstat (limited to 'synapse/metrics/__init__.py')
-rw-r--r--synapse/metrics/__init__.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/synapse/metrics/__init__.py b/synapse/metrics/__init__.py
index 7041da25ce..2265e6e8d6 100644
--- a/synapse/metrics/__init__.py
+++ b/synapse/metrics/__init__.py
@@ -111,18 +111,20 @@ def render_all():
     return "\n".join(strs)
 
 
-reactor_metrics = get_metrics_for("reactor")
-tick_time = reactor_metrics.register_distribution("tick_time")
-pending_calls_metric = reactor_metrics.register_distribution("pending_calls")
+register_process_collector(get_metrics_for("process"))
+
 
-gc_time = reactor_metrics.register_distribution("gc_time", labels=["gen"])
-gc_unreachable = reactor_metrics.register_counter("gc_unreachable", labels=["gen"])
+python_metrics = get_metrics_for("python")
 
-reactor_metrics.register_callback(
+gc_time = python_metrics.register_distribution("gc_time", labels=["gen"])
+gc_unreachable = python_metrics.register_counter("gc_unreachable_total", labels=["gen"])
+python_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"))
+reactor_metrics = get_metrics_for("python.twisted.reactor")
+tick_time = reactor_metrics.register_distribution("tick_time")
+pending_calls_metric = reactor_metrics.register_distribution("pending_calls")
 
 
 def runUntilCurrentTimer(func):