You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[SDK] Align CompositeSampler / ComposableSampler with spec (#5161), add ComposableAnnotating, and fix ParentThreshold / ValidateRatio edge cases #4798
During a cross-implementation audit of C++'s CompositeSampler and Composable* samplers against the OpenTelemetry Tracing SDK specification (open-telemetry/opentelemetry-specification#5441), four spec alignment gaps were found (separate from empty th: parsing already addressed in #4582):
Missing ComposableAnnotating built-in sampler:
The spec defines 6 built-in composable samplers; ComposableAnnotating is not yet implemented under sdk/include/opentelemetry/sdk/trace/samplers/.
ComposableParentThresholdSampler does not check parent th consistency with IsSampled() (composable_parent_threshold.cc:53-59):
Any parsed ot_state.threshold is propagated with threshold_reliable = true without verifying parent_context.IsSampled() == (R >= ot_state.threshold). Per the consistent probability sampling spec, an inconsistent parent threshold should be erased and treated as absent.
ValidateRatio silently falls back to 1.0 (100% sampling) for 0 < ratio < 2^-56 (ot_trace_state.cc:112-123):
Called by ComposableProbabilitySampler (composable_probability.cc:23), ValidateRatio rejects ratios in (0, 2^-56) and resets them to 1.0, sampling 100% of traces instead of dropping them like ComposableAlwaysOff (or rejecting the configuration).
Activity