[ETW Exporter] - Add Trace flags in SpanContext#1618
Merged
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #1618 +/- ##
==========================================
- Coverage 85.28% 85.22% -0.06%
==========================================
Files 156 156
Lines 4978 4978
==========================================
- Hits 4245 4242 -3
- Misses 733 736 +3
|
Member
Author
|
@ThomsonTan Can you please help review it? Thanks. |
esigo
reviewed
Sep 17, 2022
| auto traceId = parentContext.IsValid() ? parentContext.trace_id() : traceId_; | ||
|
|
||
| // Sampling based on attributes is not supported for now, so passing empty below. | ||
| std::map<std::string, int> empty_attributes = {{}}; |
Member
There was a problem hiding this comment.
cosmetic: It seems this file has mixed camel case and snake case.
It would be good if you could unify at least the parts you are changing.
Member
Author
There was a problem hiding this comment.
Thanks good comment. I gave it a thought, and using snake-case now, to make it consistent with the existing ETW exporter naming style. We will eventually move this component out of the core library.
ThomsonTan
reviewed
Sep 19, 2022
ThomsonTan
approved these changes
Sep 19, 2022
yxue
pushed a commit
to yxue/opentelemetry-cpp
that referenced
this pull request
Dec 5, 2022
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.
Changes
ETW exporter doesn't preserve trace flags while creating span. The trace flags contain the
IsSampledflag based on the sampling decision. This result in incorrect sampling logic execution.Also added code to copy the tracer_id from parent span to child span.
The code is taken from the sdk implementation, and a unit test is added to validate it.
For significant contributions please make sure you have completed the following items:
CHANGELOG.mdupdated for non-trivial changes