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

Commit f7ae2c7

Browse files
committed
Merge pull request #6003 from matrix-org/erikj/push_opentracing
2 parents 87856c6 + ea6956c commit f7ae2c7

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

changelog.d/6003.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add opentracing span over HTTP push processing.

synapse/push/httppusher.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
from twisted.internet import defer
2323
from twisted.internet.error import AlreadyCalled, AlreadyCancelled
2424

25+
from synapse.logging import opentracing
2526
from synapse.metrics.background_process_metrics import run_as_background_process
2627
from synapse.push import PusherConfigException
2728

@@ -194,7 +195,17 @@ def _unsafe_process(self):
194195
)
195196

196197
for push_action in unprocessed:
197-
processed = yield self._process_one(push_action)
198+
with opentracing.start_active_span(
199+
"http-push",
200+
tags={
201+
"authenticated_entity": self.user_id,
202+
"event_id": push_action["event_id"],
203+
"app_id": self.app_id,
204+
"app_display_name": self.app_display_name,
205+
},
206+
):
207+
processed = yield self._process_one(push_action)
208+
198209
if processed:
199210
http_push_processed_counter.inc()
200211
self.backoff_delay = HttpPusher.INITIAL_BACKOFF_SEC

0 commit comments

Comments
 (0)