summary refs log tree commit diff
diff options
context:
space:
mode:
authorEric Eastwood <erice@element.io>2023-05-19 11:18:45 -0500
committerGitHub <noreply@github.com>2023-05-19 11:18:45 -0500
commitca3c07e833816e69bbaf0372e6cc79f52e6db88e (patch)
tree4606766d577944aae26e62bc941aa74091265735
parentRemove old R30 because R30v2 supercedes it (#10428) (diff)
downloadsynapse-ca3c07e833816e69bbaf0372e6cc79f52e6db88e.tar.xz
Trace how many new events from the backfill response we need to process (#15633)
You can kinda derive this information from how many `_process_pulled_event` spans there are but it would be nice to quickly glance.
-rw-r--r--changelog.d/15633.misc1
-rw-r--r--synapse/handlers/federation_event.py5
2 files changed, 6 insertions, 0 deletions
diff --git a/changelog.d/15633.misc b/changelog.d/15633.misc
new file mode 100644
index 0000000000..4126a20602
--- /dev/null
+++ b/changelog.d/15633.misc
@@ -0,0 +1 @@
+Trace how many new events from the backfill response we need to process.
diff --git a/synapse/handlers/federation_event.py b/synapse/handlers/federation_event.py
index 06343d40e4..9a08618da5 100644
--- a/synapse/handlers/federation_event.py
+++ b/synapse/handlers/federation_event.py
@@ -890,6 +890,11 @@ class FederationEventHandler:
             # Continue on with the events that are new to us.
             new_events.append(event)
 
+        set_tag(
+            SynapseTags.RESULT_PREFIX + "new_events.length",
+            str(len(new_events)),
+        )
+
         # We want to sort these by depth so we process them and
         # tell clients about them in order.
         sorted_events = sorted(new_events, key=lambda x: x.depth)