-
Notifications
You must be signed in to change notification settings - Fork 772
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
Add support for samplers to modify Tracestate #3610
Add support for samplers to modify Tracestate #3610
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
|
…othomas/opentelemetry-dotnet into cijothomas/tracestatesampelr
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.
Added couple minor suggestions.
LGTM with a changelog entry.
@@ -42,6 +43,7 @@ public SamplingResult(bool isSampled) | |||
{ |
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.
Do we not need an overload for this one?
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.
its optional. if there is a need, we can always add more overloads in future.
Fixes #1708
To maintain backward compatibility,
SamplingResult
will default tonull
forTraceStateString
. 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.