-
Notifications
You must be signed in to change notification settings - Fork 438
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
Enable setting Span endtime for ETW exporter #1846
Conversation
@@ -899,7 +899,15 @@ class Span : public opentelemetry::trace::Span | |||
*/ | |||
void End(const opentelemetry::trace::EndSpanOptions &options = {}) noexcept override | |||
{ | |||
end_time_ = std::chrono::system_clock::now(); | |||
if (options.end_steady_time == opentelemetry::common::SteadyTimestamp()) |
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.
Update this to compare with 0 explicitly. And add TODO to choose a different value to represent "not set" status, as 0 is a valid value, and the user might set endtime to it.
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.
Thanks fixed this.
Changes
While it is possible to set the end-time while ending span as per the spec, the ETW exporter use the endtime passed as argument in Span::End(). This PR fixes it.
For significant contributions please make sure you have completed the following items:
CHANGELOG.md
updated for non-trivial changes