mirror of
https://github.com/element-hq/synapse
synced 2024-10-01 07:32:41 +00:00
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.
This commit is contained in:
parent
736199b763
commit
ca3c07e833
2 changed files with 6 additions and 0 deletions
1
changelog.d/15633.misc
Normal file
1
changelog.d/15633.misc
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Trace how many new events from the backfill response we need to process.
|
|
@ -890,6 +890,11 @@ class FederationEventHandler:
|
||||||
# Continue on with the events that are new to us.
|
# Continue on with the events that are new to us.
|
||||||
new_events.append(event)
|
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
|
# We want to sort these by depth so we process them and
|
||||||
# tell clients about them in order.
|
# tell clients about them in order.
|
||||||
sorted_events = sorted(new_events, key=lambda x: x.depth)
|
sorted_events = sorted(new_events, key=lambda x: x.depth)
|
||||||
|
|
Loading…
Reference in a new issue