@@ -371,13 +371,13 @@ def _detect_performance_problems(
371
371
with sentry_sdk .start_span (op = "function" , name = "get_detection_settings" ):
372
372
detection_settings = get_detection_settings (project .id )
373
373
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" ):
381
381
tree , segment_id = build_tree (data .get ("spans" , []))
382
382
data = {** data , "spans" : flatten_tree (tree , segment_id )}
383
383
0 commit comments