Skip to content

Commit 01074a2

Browse files
Abdkhan14Abdullah Khan
andauthored
feat(trace-eap-waterfall): Prevent auto-grouping eap is_transaction:true spans (#93128)
<img width="1236" alt="Screenshot 2025-06-09 at 1 58 18 PM" src="https://github.com/user-attachments/assets/c9dc087c-91b0-4111-b770-a1606070f3bf" /> --------- Co-authored-by: Abdullah Khan <abdullahkhan@PG9Y57YDXQ.local>
1 parent 48f8b62 commit 01074a2

File tree

1 file changed

+15
-6
lines changed
  • static/app/views/performance/newTraceDetails/traceModels

1 file changed

+15
-6
lines changed

static/app/views/performance/newTraceDetails/traceModels/traceTree.tsx

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -921,7 +921,10 @@ export class TraceTree extends TraceTreeEventDispatcher {
921921
while (queue.length > 0) {
922922
const node = queue.pop()!;
923923

924-
if ((!isSpanNode(node) && !isEAPSpanNode(node)) || node.children.length > 1) {
924+
if (
925+
(!isSpanNode(node) && !isNonTransactionEAPSpanNode(node)) ||
926+
node.children.length > 1
927+
) {
925928
for (const child of node.children) {
926929
queue.push(child);
927930
}
@@ -941,7 +944,8 @@ export class TraceTree extends TraceTreeEventDispatcher {
941944
while (
942945
tail &&
943946
tail.children.length === 1 &&
944-
(isSpanNode(tail.children[0]!) || isEAPSpanNode(tail.children[0]!)) &&
947+
(isSpanNode(tail.children[0]!) ||
948+
isNonTransactionEAPSpanNode(tail.children[0]!)) &&
945949
// skip `op: default` spans as `default` is added to op-less spans:
946950
tail.children[0].value.op !== 'default' &&
947951
tail.children[0].value.op === head.value.op
@@ -963,7 +967,9 @@ export class TraceTree extends TraceTreeEventDispatcher {
963967
continue;
964968
}
965969

966-
const spanId = isEAPSpanNode(head) ? head.value.event_id : head.value.span_id;
970+
const spanId = isNonTransactionEAPSpanNode(head)
971+
? head.value.event_id
972+
: head.value.span_id;
967973
const autoGroupedNode = new ParentAutogroupNode(
968974
node.parent,
969975
{
@@ -1076,7 +1082,10 @@ export class TraceTree extends TraceTreeEventDispatcher {
10761082

10771083
while (index < node.children.length) {
10781084
// Skip until we find a span candidate
1079-
if (!isSpanNode(node.children[index]!) && !isEAPSpanNode(node.children[index]!)) {
1085+
if (
1086+
!isSpanNode(node.children[index]!) &&
1087+
!isNonTransactionEAPSpanNode(node.children[index]!)
1088+
) {
10801089
index++;
10811090
matchCount = 0;
10821091
continue;
@@ -1091,7 +1100,7 @@ export class TraceTree extends TraceTreeEventDispatcher {
10911100

10921101
if (
10931102
next &&
1094-
(isSpanNode(next) || isEAPSpanNode(next)) &&
1103+
(isSpanNode(next) || isNonTransactionEAPSpanNode(next)) &&
10951104
next.children.length === 0 &&
10961105
current.children.length === 0 &&
10971106
// skip `op: default` spans as `default` is added to op-less spans
@@ -1111,7 +1120,7 @@ export class TraceTree extends TraceTreeEventDispatcher {
11111120
const autoGroupedNode = new SiblingAutogroupNode(
11121121
node,
11131122
{
1114-
span_id: isEAPSpanNode(current)
1123+
span_id: isNonTransactionEAPSpanNode(current)
11151124
? current.value.event_id
11161125
: current.value.span_id,
11171126
op: current.value.op ?? '',

0 commit comments

Comments
 (0)