Skip to content

Commit 976c31e

Browse files
fix(uptime): Create new isolation_scope for result process tracing (#94987)
1 parent 1ad226a commit 976c31e

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/sentry/remote_subscriptions/consumers/result_consumer.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -285,9 +285,11 @@ def process_group(self, items: list[T]):
285285
"""
286286
Process a group of related messages serially.
287287
"""
288-
for item in items:
289-
with sentry_sdk.start_span(
290-
name=f"monitors.{self.identifier}.result_consumer",
291-
op="result_processor.process",
292-
):
293-
self.result_processor(item)
288+
isolation_scope = sentry_sdk.get_isolation_scope().fork()
289+
with sentry_sdk.scope.use_isolation_scope(isolation_scope):
290+
for item in items:
291+
with sentry_sdk.start_span(
292+
name=f"monitors.{self.identifier}.result_consumer",
293+
op="result_processor.process",
294+
):
295+
self.result_processor(item)

0 commit comments

Comments
 (0)