summary refs log tree commit diff
path: root/synapse/federation
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/federation
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/federation')
-rw-r--r--synapse/federation/transaction_queue.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/synapse/federation/transaction_queue.py b/synapse/federation/transaction_queue.py
index 78f9d40a3a..f603c8a368 100644
--- a/synapse/federation/transaction_queue.py
+++ b/synapse/federation/transaction_queue.py
@@ -26,6 +26,8 @@ from synapse.api.errors import FederationDeniedError, HttpResponseException
 from synapse.handlers.presence import format_user_presence_state, get_interested_remotes
 from synapse.metrics import (
     LaterGauge,
+    event_processing_loop_counter,
+    event_processing_loop_room_count,
     events_processed_counter,
     sent_edus_counter,
     sent_transactions_counter,
@@ -253,7 +255,13 @@ class TransactionQueue(object):
                     synapse.metrics.event_processing_last_ts.labels(
                         "federation_sender").set(ts)
 
-                events_processed_counter.inc(len(events))
+                    events_processed_counter.inc(len(events))
+
+                    event_processing_loop_room_count.labels(
+                        "federation_sender"
+                    ).inc(len(events_by_room))
+
+                event_processing_loop_counter.labels("federation_sender").inc()
 
                 synapse.metrics.event_processing_positions.labels(
                     "federation_sender").set(next_token)