Skip to content

Revisit Default Sampler and Interaction With TraceFlags  #728

@MitchellDumovic

Description

@MitchellDumovic

Should the Default Sampler be changed from AlwaysOn to ParentOrElse(AlwaysOn)?

The spec suggests that AlwaysOn is the default - currently this is not truly enforced consistently across languages:
In Go (this might be a bug), the span's parent is always followed unless a different sampler is specified:

https://github.com/open-telemetry/opentelemetry-go/blob/master/sdk/trace/span.go#L394

One thing that I think adds some confusion (at least for me) here is the interaction between the sampler and the Span context's TraceFlags. The spec suggests that TraceFlags should be passed down from parent to child here, but by always sampling by default this may not actually happen in practice.

Metadata

Metadata

Labels

area:samplingRelated to trace samplingarea:sdkRelated to the SDKpriority:p2Medium priority levelrelease:required-for-gaMust be resolved before GA release, or nice to have before GAspec:traceRelated to the specification/trace directory

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions