Skip to content

Commit

Permalink
use bottom bits
Browse files Browse the repository at this point in the history
  • Loading branch information
danielmmetz committed Dec 23, 2022
1 parent a724cf8 commit 57736df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sdk/trace/sampling.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ type traceIDRatioSampler struct {

func (ts traceIDRatioSampler) ShouldSample(p SamplingParameters) SamplingResult {
psc := trace.SpanContextFromContext(p.ParentContext)
x := binary.BigEndian.Uint64(p.TraceID[0:8]) >> 1
x := binary.BigEndian.Uint64(p.TraceID[8:16]) >> 1
if x < ts.traceIDUpperBound {
return SamplingResult{
Decision: RecordAndSample,
Expand Down

0 comments on commit 57736df

Please sign in to comment.