Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Trace how many new events from the backfill response we need to process #15633

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/15633.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Trace how many new events from the backfill response we need to process.
5 changes: 5 additions & 0 deletions synapse/handlers/federation_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -890,6 +890,11 @@ async def _process_pulled_events(
# 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)
Expand Down