Set span start and end timestamps#98
Merged
reyang merged 2 commits intoopen-telemetry:masterfrom Jun 9, 2020
Merged
Conversation
maxgolov
reviewed
Jun 8, 2020
| void UpdateName(nostd::string_view name) noexcept override { span_->UpdateName(name); } | ||
|
|
||
| void End() noexcept override { span_->End(); } | ||
| void End(const trace::EndSpanOptions &options = {}) noexcept override { span_->End(options); } |
Contributor
There was a problem hiding this comment.
Is there a reason we have different structures for StartSpanOptions and EndSpanOptions?
Would it make sense to have one common options class, such as SpanOptions ?
Contributor
Author
There was a problem hiding this comment.
The intent behind this design is to make it very clear to the API user which option can be set at which time (at start and end).
This also reflects the OpenTracing API, which provides FinishSpanOptions and StartSpanOptions.
Member
|
@pyohannes please rebase, thanks. |
added 2 commits
June 8, 2020 17:00
Contributor
Author
|
@reyang This is rebased now. |
GerHobbelt
pushed a commit
to GerHobbelt/opentelemetry-cpp
that referenced
this pull request
Jun 17, 2025
[PROMETHEUS_EXPORTER] Fix default for emitting otel_scope attributes …
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds SDK support for setting start and end timestamps on spans.
SystemTimestampandSteadyTimestampare added.Spanimplementation in the SDK is updated to use given timestamps or calculate timestamps based on the current time.