Skip to content

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

@PeterF778

Description

@PeterF778

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions