未验证 提交 f80d8519 编写于 作者: L linliaoy 提交者: GitHub

traceId.hashCode() Adding Math#abs (#5506)

上级 2ebb5bdf
......@@ -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();
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册