Skip to content

Commit b699e8b

Browse files
committed
Fill in synapse/handlers/federation_event.py
1 parent ee223c6 commit b699e8b

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

synapse/handlers/federation_event.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
tag_args,
7777
trace,
7878
)
79+
from synapse.metrics import SERVER_NAME_LABEL
7980
from synapse.metrics.background_process_metrics import run_as_background_process
8081
from synapse.replication.http.federation import (
8182
ReplicationFederationSendEventsRestServlet,
@@ -111,7 +112,7 @@
111112
backfill_processing_after_timer = Histogram(
112113
"synapse_federation_backfill_processing_after_time_seconds",
113114
"sec",
114-
[],
115+
labelnames=[SERVER_NAME_LABEL],
115116
buckets=(
116117
0.1,
117118
0.25,
@@ -690,7 +691,9 @@ async def backfill(
690691
if not events:
691692
return
692693

693-
with backfill_processing_after_timer.time():
694+
with backfill_processing_after_timer.labels(
695+
**{SERVER_NAME_LABEL: self.server_name}
696+
).time():
694697
# if there are any events in the wrong room, the remote server is buggy and
695698
# should not be trusted.
696699
for ev in events:

0 commit comments

Comments
 (0)