Skip to content

Commit

Permalink
fix(issues): Fix SDK crash detection span op
Browse files Browse the repository at this point in the history
This op is already being auto-instrumented in run_post_process_job, the
duplicate span here with the same name is not helpful when looking at
aggregates.

This renames the op and adds another around config building - in the
future I suspect we can get a very easy win by not rebuilding config for
every single event - this will give us some data to back up that theory.
  • Loading branch information
mrduncan committed Jan 3, 2025
1 parent e5f0734 commit f2c5361
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/sentry/tasks/post_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -1292,15 +1292,13 @@ def sdk_crash_monitoring(job: PostProcessJob):
if not features.has("organizations:sdk-crash-detection", event.project.organization):
return

configs = build_sdk_crash_detection_configs()
if not configs or len(configs) == 0:
return None
with sentry_sdk.start_span(op="post_process.build_sdk_crash_config"):
configs = build_sdk_crash_detection_configs()
if not configs or len(configs) == 0:
return None

with sentry_sdk.start_span(op="tasks.post_process_group.sdk_crash_monitoring"):
sdk_crash_detection.detect_sdk_crash(
event=event,
configs=configs,
)
with sentry_sdk.start_span(op="post_process.detect_sdk_crash"):
sdk_crash_detection.detect_sdk_crash(event=event, configs=configs)


def plugin_post_process_group(plugin_slug, event, **kwargs):
Expand Down

0 comments on commit f2c5361

Please sign in to comment.