fix(trace): Preserve EAP transaction parentage#112492
fix(trace): Preserve EAP transaction parentage#112492nsdeschenes wants to merge 1 commit intomasterfrom
Conversation
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
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ 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; | ||
| } |
There was a problem hiding this comment.
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.
Reviewed by Cursor Bugbot for commit db2012a. Configure here.


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