-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
feat(trace-tree-node): Mitigating trace root node type guards usage #104503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: abdk/trace-tree-node-error-guards-usage
Are you sure you want to change the base?
feat(trace-tree-node): Mitigating trace root node type guards usage #104503
Conversation
❌ 46 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
|
|
||
| const node = tree.root.findChild(n => n.value === event); | ||
| return node?.traceHeaderTitle ?? null; | ||
| return event.traceHeaderTitle ?? null; |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
| bodyText={getRootDuration( | ||
| props.representativeEvent.event as TraceTree.TraceEvent | ||
| )} | ||
| bodyText={getRootDuration(props.representativeEvent?.event as BaseNode | null)} |
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Valid removed casting
| // in the trace for the title. | ||
| firstEvent = node; | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Uptime check priority removed from representative event selection
The old getRepresentativeTraceEvent had special early-return handling for uptime checks: if the first trace child was an uptime check, it was immediately returned as the representative event. The new findRepresentativeTraceNode removes this prioritization. Since UptimeCheck values lack parent_span_id, they fail the isRootEvent check and won't match hasPreferredOp (uptime ops aren't in ['pageload', 'navigation', 'ui.load']). In traces containing both uptime checks and other nodes like transactions, a different node may now be selected as the representative event, potentially changing trace header titles and metadata display.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to return early for uptime events
getRepresentativeTraceEventutil toTraceTree.findRepresentativeTraceNode.baseNode.childrennodes and have access to all new functionality.Also:
baseNode.isEAPEventpropertybaseNode.traceItemDatasetproperty