-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
feat(trace-tree-node): Mitigating error node type guards usage #104501
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-uptime-check-guard-usage
Are you sure you want to change the base?
feat(trace-tree-node): Mitigating error node type guards usage #104501
Conversation
…k/trace-tree-node-error-guards-usage
| true | ||
| ); | ||
| const startTimestamp = 'start_timestamp' in event ? event.start_timestamp : undefined; | ||
| // TODO Abdullah Khan: Clean this up once getRepresentativeTraceEvent is moved to the TraceTree class |
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.
Addressed this here: #104503
| 'timestamp' in event | ||
| ? event.timestamp | ||
| : 'event_timestamp' in event && typeof event.event_timestamp === 'number' | ||
| ? event.event_timestamp |
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: Wrong property name causes missing duration for EAP events
The code checks for event_timestamp but this property doesn't exist on any TraceTree.TraceEvent type. For EAPSpan and UptimeCheck events, the end time is stored in end_timestamp, not event_timestamp. This causes the duration calculation to fail for these event types, returning '\u2014' instead of the actual duration. The condition should check for 'end_timestamp' in event rather than 'event_timestamp' in event.
No description provided.