Add SpanContext (and TraceState) to Recordable#667
Merged
lalitb merged 3 commits intoopen-telemetry:mainfrom Apr 13, 2021
Merged
Add SpanContext (and TraceState) to Recordable#667lalitb merged 3 commits intoopen-telemetry:mainfrom
lalitb merged 3 commits intoopen-telemetry:mainfrom
Conversation
67b0b80 to
ca5887c
Compare
eyjohn
commented
Apr 9, 2021
| // See the License for the specific language governing permissions and | ||
| // limitations under the License. | ||
|
|
||
| #pragma once |
Contributor
Author
There was a problem hiding this comment.
Initially considered using kv_properties for trace state, during which I hit redeclarations due to this being missing
| */ | ||
| const std::unordered_map<std::string, opentelemetry::sdk::common::OwnedAttributeValue> | ||
| GetAttributes() const noexcept | ||
| std::unordered_map<std::string, opentelemetry::sdk::common::OwnedAttributeValue> GetAttributes() |
Contributor
Author
There was a problem hiding this comment.
if we have to copy for thread safety, the copy doesn't need to be const
| void AddEvent(nostd::string_view name, | ||
| core::SystemTimestamp timestamp, | ||
| const opentelemetry::common::KeyValueIterable &attributes) noexcept override | ||
| void AddEvent( |
Contributor
Author
There was a problem hiding this comment.
to make consistent with ThreadsafeSpanData and avoid having to explicitly have to reference .opentelemetry::sdk::trace::Recordable::AddEvent
Contributor
Author
|
WIP till I make CI happy |
Codecov Report
@@ Coverage Diff @@
## main #667 +/- ##
==========================================
+ Coverage 94.65% 94.67% +0.02%
==========================================
Files 204 204
Lines 9387 9416 +29
==========================================
+ Hits 8885 8915 +30
+ Misses 502 501 -1
|
- Updated Recordable interface to take a span context and parent span id rather than just the trace/span ids. - Updated SpanData to new interface and added new getters for accessing SpanContext - Updated ThreadsafeSpanData with the same - Updated tests for both (and made consistent) - Updated OStreamSpanExporter to print tracestate and tests
- Added SetIdentity to otlp::Recordable (with tracestate) - Added SetIdentity to Zipkin (without tracestate support) - Fixed minor formatting issue
7126da9 to
b79031a
Compare
pyohannes
approved these changes
Apr 12, 2021
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.
Fixes #661
Changes
rather than just the trace/span ids.
SpanContext
For significant contributions please make sure you have completed the following items:
CHANGELOG.mdupdated for non-trivial changes