traceId.hashCode() Adding Math#abs (#5506)
This commit is contained in:
parent
2ebb5bdf3a
commit
f80d851964
|
|
@ -32,6 +32,6 @@ public class TraceSegmentSampler {
|
|||
}
|
||||
|
||||
public boolean shouldSample(String traceId) {
|
||||
return traceId.hashCode() % 10000 < traceSampleRateWatcher.getSampleRate();
|
||||
return Math.abs(traceId.hashCode()) % 10000 < traceSampleRateWatcher.getSampleRate();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue