TraceIDRatioBased doesn't work with xray.NewIDGenerator #2735
Labels
area: propagators
Related to the propagators module
bug
Something isn't working
propagator: aws:xray
The first 4 bytes of an xray trace id are time based (https://docs.aws.amazon.com/xray/latest/devguide/xray-api-sendingdata.html#xray-api-traceids):
opentelemetry-go-contrib/propagators/aws/xray/idgenerator.go
Lines 57 to 59 in ace6b3c
When using
TraceIDRatioBased
, it compares the first 8 bytes to see if it should sample:https://github.com/open-telemetry/opentelemetry-go/blob/569f7430726278f40e562f81e64d21156cc3edb9/sdk/trace/sampling.go#L84-L85
This assumes that the first 8 bytes are random, which they are not. So if the current time is above the upper bound it will never sample.
The text was updated successfully, but these errors were encountered: