-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Description
The purpose and use-cases of the new component
New pkg/sampling component will contain common library code for:
- Parsing a W3C tracestate header
- APIs for extracting modifying, interpreting an OpenTelemetry tracestate header
- APIs for Threshold, Randomness, conversion to/from probability values
- Consistent probability sampling mechanism using all of the above.
Example configuration for the component
No direct configuration in yaml. This module supports a strictly defined translation between IEEE 754 floating point values and so-called "Threshold" values.
A simple component that uses this library (e.g., probabilisticsamplerprocessor) will extract probabilities from yaml configuration and convert them into a Threshold
value using one of two methods:
ProbabilityToThreshold
: exact translation from floating point to threshold, preserves all significant bits, in which case Threshold-to-Probability is an exact round trip.ProbabilityToThresholdWithPrecision
: approximate translation from floating point to threshold, will round probability value to limit the encoding size, in which case Threshold-to-Probability is not a round trip.
Telemetry data types supported
Tracing receives direct support, in the sense that Randomness
can be extracted from pcommon.TraceID
. However, the Randomness
type can be used directly and this package may be extended to apply consistent probability sampling to other data types.
Is this a vendor-specific component?
- This is a vendor-specific component
- If this is a vendor-specific component, I am proposing to contribute and support it as a representative of the vendor.
Code Owner(s)
jmacd, kentquirk
Sponsor (optional)
codeboten
Additional context
This implements the draft specification proposal in open-telemetry/oteps#235
This implements the already-specified rules for tracestate handling: https://opentelemetry.io/docs/specs/otel/trace/tracestate-handling/
This is one step in an umbrella issue, the overall goal is stated here: open-telemetry/opentelemetry-specification#1413