Skip to content
This repository was archived by the owner on Sep 17, 2025. It is now read-only.
This repository was archived by the owner on Sep 17, 2025. It is now read-only.

Override trace sampling decision #481

@c24t

Description

@c24t

It should be possible to override the sampling decision for a given span by setting the span's sampler. Currently we always sample a span if the sampling bit is set in the span's TraceOptions. This bit indicates that the parent span was sampled.

For example, setting the sampler to AlwaysOffSampler should cause the span never to be sampled, even if the parent span was sampled. This isn't the case now because we short-circuit the sampler if the sampling bit is set.

Compare to the java client which sets the sampler in the SpanBuilder. In java we pass the span context to the sampler, which ultimately makes the sampling decision.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions