Skip to content

fix(trace): Preserve EAP transaction parentage#112492

Draft
nsdeschenes wants to merge 1 commit intomasterfrom
nd/EXP-756/fix-waterfall-eap-transaction-reparenting
Draft

fix(trace): Preserve EAP transaction parentage#112492
nsdeschenes wants to merge 1 commit intomasterfrom
nd/EXP-756/fix-waterfall-eap-transaction-reparenting

Conversation

@nsdeschenes
Copy link
Copy Markdown
Contributor

Preserve the real parent-child relationships in the EAP trace tree when a span is flagged as a transaction.

The previous constructor-time hoist attached transaction-flagged spans to the nearest ancestor transaction, which could place subprocess spans under the wrong branch in the collapsed waterfall. This keeps the real parentage from the API and derives the summarized transactions-only view from visibility rules instead.

I considered keeping the constructor heuristic and trying to special-case parent_span_id, but that would still mix display concerns into the underlying tree structure. Keeping actual parentage as the source of truth makes expand/collapse behavior predictable and lets the tests cover the broken branch-selection case directly.

The snapshots change because collapsed EAP transaction rows now reflect the real tree depth instead of the synthetic hoisted depth.

Refs EXP-756

Made with Cursor

Keep EAP transaction nodes attached to their actual parent spans so the
collapsed tree no longer assigns transaction-flagged spans to the wrong
ancestor branch. Derive the summarized transactions-only view from
visibility rules instead of mutating parentage during construction.

Co-Authored-By: GPT-5.4 <noreply@openai.com>
Made-with: Cursor
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Apr 8, 2026
Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit db2012a. Configure here.

}

return collapsedChildren;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Collapsed view misses transactions inside autogroup nodes

Medium Severity

getCollapsedTransactionChildren() skips any non-EAP node (like ParentAutogroupNode) without recursing into its children. After ApplyPreferences runs autogrouping, chains of same-op EAP spans can be wrapped in a ParentAutogroupNode. Any EAP transaction nested below that autogroup node becomes invisible in the collapsed transaction view because the traversal hits the autogroup wrapper, fails the isEAPSpanNode check, and continues past it without exploring descendants.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit db2012a. Configure here.

@linear-code
Copy link
Copy Markdown

linear-code bot commented Apr 8, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant