summary refs log tree commit diff
path: root/synapse/federation
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2018-08-08 23:16:58 +0100
committerGitHub <noreply@github.com>2018-08-08 23:16:58 +0100
commitbb89c84614303dde2298bcff7838c13a5698eb6c (patch)
treee687256fc74822d07cf6b75daeb98fff412e4fa8 /synapse/federation
parentMerge pull request #3654 from matrix-org/rav/room_versions (diff)
parentchangelog (diff)
downloadsynapse-bb89c84614303dde2298bcff7838c13a5698eb6c.tar.xz
Merge pull request #3664 from matrix-org/rav/federation_metrics
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)