diff options
author | Erik Johnston <erik@matrix.org> | 2018-04-11 11:07:51 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2018-04-11 12:13:40 +0100 |
commit | 92e34615c5c9ed5df2b0072a2686d3e42239e420 (patch) | |
tree | 53fe39bfa8245da8fa1e73690ac18a4fab9c28e7 /synapse/metrics/__init__.py | |
parent | Add GaugeMetric (diff) | |
download | synapse-92e34615c5c9ed5df2b0072a2686d3e42239e420.tar.xz |
Track where event stream processing have gotten up to
Diffstat (limited to 'synapse/metrics/__init__.py')
-rw-r--r-- | synapse/metrics/__init__.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/synapse/metrics/__init__.py b/synapse/metrics/__init__.py index 2666f982a6..a6c0d7e1bf 100644 --- a/synapse/metrics/__init__.py +++ b/synapse/metrics/__init__.py @@ -151,6 +151,19 @@ 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") +synapse_metrics = get_metrics_for("synapse") + +# Used to track where various components have processed in the event stream, +# e.g. federation sending, appservice sending, etc. +event_processing_positions = synapse_metrics.register_gauge( + "event_processing_positions", labels=["name"], +) + +# Used to track the current max events stream position +event_persisted_position = synapse_metrics.register_gauge( + "event_persisted_position", +) + def runUntilCurrentTimer(func): |