Skip to content

Commit d49cf97

Browse files
authored
chore(detectors): Update span for performance detection span sorting (#96661)
we only care about the actual sorting here - the flagpole call was adding some noise. also adds a better description for the span
1 parent 40fa0cc commit d49cf97

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/sentry/performance_issues/performance_detection.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -371,13 +371,13 @@ def _detect_performance_problems(
371371
with sentry_sdk.start_span(op="function", name="get_detection_settings"):
372372
detection_settings = get_detection_settings(project.id)
373373

374-
with sentry_sdk.start_span(op="function", name="sort_spans"):
375-
if standalone or features.has("organizations:issue-detection-sort-spans", organization):
376-
# The performance detectors expect the span list to be ordered/flattened in the way they
377-
# are structured in the tree. This is an implicit assumption in the performance detectors.
378-
# So we build a tree and flatten it depth first.
379-
# TODO: See if we can update the detectors to work without this assumption so we can
380-
# just pass it a list of spans.
374+
if standalone or features.has("organizations:issue-detection-sort-spans", organization):
375+
# The performance detectors expect the span list to be ordered/flattened in the way they
376+
# are structured in the tree. This is an implicit assumption in the performance detectors.
377+
# So we build a tree and flatten it depth first.
378+
# TODO: See if we can update the detectors to work without this assumption so we can
379+
# just pass it a list of spans.
380+
with sentry_sdk.start_span(op="performance_detection", name="sort_spans"):
381381
tree, segment_id = build_tree(data.get("spans", []))
382382
data = {**data, "spans": flatten_tree(tree, segment_id)}
383383

0 commit comments

Comments
 (0)