Align jaeger probabilistic sampler with trace.TraceIDRatioBased by diurnalist · Pull Request #6892 · open-telemetry/opentelemetry-go-contrib (original) (raw)

@diurnalist

currently the jaegerremotesampler has a custom probabilistic sampler that does not align with how the traceid_ratiobased sampler works. it only looks at the first 64 bits of the trace; the opentelemetry-go sampler looks at the last 64 bits, because there are cases when trace IDs having 64 bits are converted to otel trace IDs, which have 128 bits, and when that happens the first 64 bits are typically ignored/zero-d out.

rather than re-implement this logic, this just pulls in the traceid_ratiobased sampler so we re-use it, ensuring the decisions will be made similarly and predictably.

diurnalist

@diurnalist

yurishkuro

yurishkuro

@diurnalist

@diurnalist

@diurnalist

@diurnalist

yurishkuro

dmathieu

@diurnalist @dmathieu

Co-authored-by: Damien Mathieu 42@dmathieu.com

dmathieu

@dmathieu

@dmathieu dmathieu changed the titlealign jaeger probabilistic sampler with traceidratiobased Align jaeger probabilistic sampler with trace.TraceIDRatioBased

Mar 10, 2025

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})