-
Notifications
You must be signed in to change notification settings - Fork 502
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
Add end_with_timestamp method for trace span. #199
Conversation
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.
Looks great, thanks @TommyCpp just one ergonomics request
src/api/trace/span.rs
Outdated
@@ -152,8 +152,15 @@ pub trait Span: fmt::Debug + 'static + Send + Sync { | |||
/// Calls to `end` a Span MUST not have any effects on child `Span`s as they may | |||
/// still be running and can be ended later. | |||
/// | |||
///This API MUST be non-blocking. | |||
/// This API MUST be non-blocking. | |||
fn end(&self); |
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.
It may be useful to implement this method by default in terms of end_with_timestamp
now to avoid requiring redundant impls for both methods.
* Add default implementation for `end`.
@TommyCpp looks like the clippy rules got updated today so this is no longer passing 😐 |
That's interesting. I will update it later today. |
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.
Looks great 👍
closes #14
On a side note, maybe we could create a mod for test utils. We have
TestSpan
in four different files, which could be put into one place.