-
Notifications
You must be signed in to change notification settings - Fork 94
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
feat(spans): Add TTID and TTFD tags #2662
Conversation
assert_eq!(tags.get("ttid").unwrap().as_str(), Some("true")); | ||
assert_eq!(tags.get("ttfd").unwrap().as_str(), Some("true")); |
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.
@shruthilayaj spans that contribute to initial display also contribute to full display. Does that make sense?
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.
yes, TTID contributing spans are a subset of TTFD contributing spans!
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.
Left one small comment, otherwise LGTM.
span_tags | ||
} | ||
|
||
/// Finds time-to-initial/full-display spans and returns its end times. | ||
fn display_times(spans: &[Annotated<Span>]) -> (Option<Timestamp>, Option<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.
Maybe instead of the tuple here it would be clearer to create a struct and set the fields with proper names in it.
It can be easy to mistaken the order of the returned values just looking at the function signature.
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.
Good point. I refactored this to use .find()
instead of writing a homemade loop now, let me know what you think.
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.
yeah, nice!
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.
🚢
If
ui.load.initial_display
and/orui.load.full_display
spans are present, mark spans happening before those withttid
andttfd
tags.