Add support for samplers to modify Tracestate#3610
Merged
cijothomas merged 11 commits intoopen-telemetry:mainfrom Aug 29, 2022
Merged
Add support for samplers to modify Tracestate#3610cijothomas merged 11 commits intoopen-telemetry:mainfrom
cijothomas merged 11 commits intoopen-telemetry:mainfrom
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #3610 +/- ##
==========================================
- Coverage 87.22% 87.14% -0.08%
==========================================
Files 280 280
Lines 10056 10073 +17
==========================================
+ Hits 8771 8778 +7
- Misses 1285 1295 +10
|
vishweshbankwar
approved these changes
Aug 29, 2022
…othomas/opentelemetry-dotnet into cijothomas/tracestatesampelr
reyang
reviewed
Aug 29, 2022
reyang
reviewed
Aug 29, 2022
reyang
approved these changes
Aug 29, 2022
Member
reyang
left a comment
There was a problem hiding this comment.
Added couple minor suggestions.
LGTM with a changelog entry.
utpilla
reviewed
Aug 29, 2022
| @@ -42,6 +43,7 @@ public SamplingResult(bool isSampled) | |||
| { | |||
Contributor
There was a problem hiding this comment.
Do we not need an overload for this one?
Member
Author
There was a problem hiding this comment.
its optional. if there is a need, we can always add more overloads in future.
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 #1708
To maintain backward compatibility,
SamplingResultwill default tonullforTraceStateString. Any non-null value set by samplers, will be set as the tracestate of the created activity.If sampler intents to not modify tracestate, it can return null. (Default)
Else, it can populate tracestate with desired value.
Given tracestate is implemented as a opaque string, the samper is responsible for ensuring the tracestate semantics are followed.