summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2020-02-25 11:37:18 +0000
committerAndrew Morgan <andrew@amorgan.xyz>2020-02-25 11:37:18 +0000
commitf7ae2c70706448b57a3a7014397a6953f11d31a6 (patch)
treefb34fcbeb1510f863d4e8aa5a1e98a234acdaa94
parentServers-known-about statistic (#5981) (diff)
parentMerge pull request #6003 from matrix-org/erikj/push_opentracing (diff)
downloadsynapse-f7ae2c70706448b57a3a7014397a6953f11d31a6.tar.xz
Merge pull request #6003 from matrix-org/erikj/push_opentracing
-rw-r--r--changelog.d/6003.misc1
-rw-r--r--synapse/push/httppusher.py13
2 files changed, 13 insertions, 1 deletions
diff --git a/changelog.d/6003.misc b/changelog.d/6003.misc
new file mode 100644

index 0000000000..4152d05f87 --- /dev/null +++ b/changelog.d/6003.misc
@@ -0,0 +1 @@ +Add opentracing span over HTTP push processing. diff --git a/synapse/push/httppusher.py b/synapse/push/httppusher.py
index 9eaf73fc76..a6c1c2a9a9 100644 --- a/synapse/push/httppusher.py +++ b/synapse/push/httppusher.py
@@ -22,6 +22,7 @@ from prometheus_client import Counter from twisted.internet import defer from twisted.internet.error import AlreadyCalled, AlreadyCancelled +from synapse.logging import opentracing from synapse.metrics.background_process_metrics import run_as_background_process from synapse.push import PusherConfigException @@ -194,7 +195,17 @@ class HttpPusher(object): ) for push_action in unprocessed: - processed = yield self._process_one(push_action) + with opentracing.start_active_span( + "http-push", + tags={ + "authenticated_entity": self.user_id, + "event_id": push_action["event_id"], + "app_id": self.app_id, + "app_display_name": self.app_display_name, + }, + ): + processed = yield self._process_one(push_action) + if processed: http_push_processed_counter.inc() self.backoff_delay = HttpPusher.INITIAL_BACKOFF_SEC