Skip to content
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

ConsistentSampler does not unset p from tracestate when deciding not to sample #349

Closed
PeterF778 opened this issue May 20, 2022 · 2 comments
Labels

Comments

@PeterF778
Copy link
Contributor

Description

According to the specs, a consistent probability sampler should unset p from tracestate when deciding not to sample. This functionality seems to be missing, the tracestate as left by the ConsistentSampler will have the p-value set regardless of the sampling decision.

Steps to reproduce
Configure ConsistentProbabilityBasedSampler with low probability (< 1.0).
Apply this sampler to a parent span. Observe the tracestate at a child span.
You will see that the tracestate always contains the p-value.

Expectation
When the parent span is not sampled, the tracestate visible at the child span should contain the r-value, but not the p-value.

What applicable config did you use?
Config: (e.g. the yaml config file)

Relevant Environment Information
Version: 1.13.0-alpha
OS: macOS BigSur

@PeterF778 PeterF778 added the type: bug Something isn't working label May 20, 2022
@trask
Copy link
Member

trask commented May 20, 2022

cc @oertl

@oertl
Copy link
Contributor

oertl commented May 20, 2022

@PeterF778, thanks for reporting this. Will fix that.

oertl added a commit to dynatrace-oss-contrib/opentelemetry-java-contrib that referenced this issue May 23, 2022
@trask trask closed this as completed in 6778060 May 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants