Summary
The SPLUNK_SNAPSHOT_SELECTION_PROBABILITY env var accepts any float value with no upper bound validation, but the GDI spec sets a maximum selection rate of 0.10.
Spec requirement
GDI Specification v1.8.0 — behaviors.md (Trace Selection):
Trace selection MUST be randomized with the following constraints:
- Default selection rate of 0.01
- Maximum selection rate of 0.10
Note: there is an internal inconsistency in the spec — configuration.md says MUST be 0 < n <= 1, while behaviors.md says max 0.10. The behaviors section is more specific.
Current state
src/splunk_otel/propagator.py:75-77 and src/splunk_otel/distro.py:134 pass the value directly to TraceIdRatioBased with no clamping or warning. A user setting SPLUNK_SNAPSHOT_SELECTION_PROBABILITY=1.0 would get 100% selection with no error.
Expected
- Clamp the value to
(0.0, 0.10] or log a warning when the value exceeds 0.10
- Raise or warn on values
<= 0
References
src/splunk_otel/propagator.py:75-77
src/splunk_otel/distro.py:134
Summary
The
SPLUNK_SNAPSHOT_SELECTION_PROBABILITYenv var accepts any float value with no upper bound validation, but the GDI spec sets a maximum selection rate of 0.10.Spec requirement
GDI Specification v1.8.0 — behaviors.md (Trace Selection):
Note: there is an internal inconsistency in the spec —
configuration.mdsaysMUST be 0 < n <= 1, whilebehaviors.mdsays max 0.10. The behaviors section is more specific.Current state
src/splunk_otel/propagator.py:75-77andsrc/splunk_otel/distro.py:134pass the value directly toTraceIdRatioBasedwith no clamping or warning. A user settingSPLUNK_SNAPSHOT_SELECTION_PROBABILITY=1.0would get 100% selection with no error.Expected
(0.0, 0.10]or log a warning when the value exceeds 0.10<= 0References
src/splunk_otel/propagator.py:75-77src/splunk_otel/distro.py:134