Skip to content

Commit af3ab6f

Browse files
authored
chore(uptime): Add processing time stat (#95943)
<!-- Describe your PR here. -->
1 parent b3175c8 commit af3ab6f

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/sentry/remote_subscriptions/consumers/queue_consumer.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,17 @@ def run(self) -> None:
167167
break
168168

169169
try:
170-
with sentry_sdk.start_transaction(
171-
op="queue_worker.process",
172-
name=f"monitors.{self.identifier}.worker_{self.worker_id}",
170+
with (
171+
sentry_sdk.start_transaction(
172+
op="queue_worker.process",
173+
name=f"monitors.{self.identifier}.worker_{self.worker_id}",
174+
),
175+
metrics.timer(
176+
"remote_subscriptions.queue_worker.processing_time",
177+
tags={
178+
"identifier": self.identifier,
179+
},
180+
),
173181
):
174182
self.result_processor(self.identifier, work_item.result)
175183
except Exception:

0 commit comments

Comments
 (0)