-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Problem Statement
#5645 contained the first Go prototype that was used in developing the specification. https://github.com/jmacd/go-sampler contained a second prototype, including the composable samplers.
Proposed Solution
The PR above serves as a reference. It's too large to submit as one PR, there are 4+ separate topic areas:
- randomness handling
- tracestate handling
- consistent probability sampler
- composable samplers
Alternatives
If there is interest, I can re-submit this work as a series of PRs.
Prior Art
A prior Sampler implementation,
should be removed as deprecated, is no longer specified. This code contains a functional OpenTelemetry tracestate implementation that we could keep, however note that I took a simpler approach in #5645.
Additional Context
The probability sampling specification:
https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/tracestate-probability-sampling.md
Tracestate handling:
https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/tracestate-handling.md
New probability sampler:
https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/sdk.md#probabilitysampler
Composite/composable samplers:
https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/sdk.md#compositesampler