Skip to content

fix(spans): Exclude segment span from breakdown computation#111520

Merged
mjq merged 2 commits intomasterfrom
mjq/fix-enricher-breakdown
Mar 25, 2026
Merged

fix(spans): Exclude segment span from breakdown computation#111520
mjq merged 2 commits intomasterfrom
mjq/fix-enricher-breakdown

Conversation

@mjq
Copy link
Member

@mjq mjq commented Mar 25, 2026

compute_breakdowns was including the segment span itself when computing operation-based time breakdowns. When the segment root span had an op matching the breakdown config (e.g. http.server matching "http"), its full duration was counted, inflating the breakdown to the entire segment length instead of reflecting only child span durations.

Filter out the segment span at the call site before passing spans to compute_breakdowns, and rename the parameter to child_spans to signal the expected input.

compute_breakdowns was including the segment span itself when computing
operation-based time breakdowns. When the segment root span had an op
matching the breakdown config (e.g. http.server matching "http"), its
full duration was counted, inflating the breakdown to the entire segment
length instead of reflecting only child span durations.

Filter out the segment span at the call site before passing spans to
compute_breakdowns, and rename the parameter to child_spans to signal
the expected input.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Mar 25, 2026
@mjq mjq marked this pull request as ready for review March 25, 2026 14:29
@mjq mjq requested review from a team as code owners March 25, 2026 14:29
@mjq mjq enabled auto-merge (squash) March 25, 2026 16:31
@mjq mjq merged commit bea5eed into master Mar 25, 2026
63 of 64 checks passed
@mjq mjq deleted the mjq/fix-enricher-breakdown branch March 25, 2026 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants