summary refs log tree commit diff
path: root/synapse/metrics/__init__.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2018-04-11 11:52:19 +0100
committerErik Johnston <erik@matrix.org>2018-04-11 14:27:09 +0100
commit4dae4a97ed0e0b2cc9b5493172670ec7353ded2e (patch)
treec9cba610b5cd4985b46d50fd4fd8197179d48790 /synapse/metrics/__init__.py
parentTrack where event stream processing have gotten up to (diff)
downloadsynapse-4dae4a97ed0e0b2cc9b5493172670ec7353ded2e.tar.xz
Track last processed event received_ts
Diffstat (limited to 'synapse/metrics/__init__.py')
-rw-r--r--synapse/metrics/__init__.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/synapse/metrics/__init__.py b/synapse/metrics/__init__.py
index a6c0d7e1bf..e3b831db67 100644
--- a/synapse/metrics/__init__.py
+++ b/synapse/metrics/__init__.py
@@ -164,6 +164,19 @@ event_persisted_position = synapse_metrics.register_gauge(
     "event_persisted_position",
 )
 
+# Used to track the received_ts of the last event processed by various
+# components
+event_processing_last_ts = synapse_metrics.register_gauge(
+    "event_processing_last_ts", labels=["name"],
+)
+
+# Used to track the lag processing events. This is the time difference
+# between the last processed event's received_ts and the time it was
+# finished being processed.
+event_processing_lag = synapse_metrics.register_gauge(
+    "event_processing_lag", labels=["name"],
+)
+
 
 def runUntilCurrentTimer(func):