summary refs log tree commit diff
path: root/synapse/handlers/appservice.py
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2018-08-07 19:09:48 +0100
committerRichard van der Hoff <richard@matrix.org>2018-08-07 19:09:48 +0100
commit53bca4690b5c94fb1506dbc628ce2ef0f770745f (patch)
tree78240d3578a9b76dfd88b64e68b0956af492a618 /synapse/handlers/appservice.py
parentReturn M_NOT_FOUND when a profile could not be found. (#3596) (diff)
downloadsynapse-53bca4690b5c94fb1506dbc628ce2ef0f770745f.tar.xz
more metrics for the federation and appservice senders
Diffstat (limited to 'synapse/handlers/appservice.py')
-rw-r--r--synapse/handlers/appservice.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/synapse/handlers/appservice.py b/synapse/handlers/appservice.py
index ee41aed69e..f0f89af7dc 100644
--- a/synapse/handlers/appservice.py
+++ b/synapse/handlers/appservice.py
@@ -23,6 +23,10 @@ from twisted.internet import defer
 
 import synapse
 from synapse.api.constants import EventTypes
+from synapse.metrics import (
+    event_processing_loop_counter,
+    event_processing_loop_room_count,
+)
 from synapse.metrics.background_process_metrics import run_as_background_process
 from synapse.util.logcontext import make_deferred_yieldable, run_in_background
 from synapse.util.metrics import Measure
@@ -136,6 +140,12 @@ class ApplicationServicesHandler(object):
 
                     events_processed_counter.inc(len(events))
 
+                    event_processing_loop_room_count.labels(
+                        "appservice_sender"
+                    ).inc(len(events_by_room))
+
+                    event_processing_loop_counter.labels("appservice_sender").inc()
+
                     synapse.metrics.event_processing_lag.labels(
                         "appservice_sender").set(now - ts)
                     synapse.metrics.event_processing_last_ts.labels(