File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
aws-xray/src/main/java/io/opentelemetry/contrib/awsxray Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 2828import java .util .concurrent .Executors ;
2929import java .util .concurrent .ScheduledExecutorService ;
3030import java .util .concurrent .ScheduledFuture ;
31+ import java .util .concurrent .ThreadLocalRandom ;
3132import java .util .concurrent .TimeUnit ;
3233import java .util .function .Function ;
3334import java .util .logging .Level ;
@@ -96,7 +97,7 @@ public static AwsXrayRemoteSamplerBuilder newBuilder(Resource resource) {
9697
9798 this .pollingIntervalNanos = pollingIntervalNanos ;
9899 // Add ~1% of jitter
99- jitterNanos = new Random ().longs (0 , pollingIntervalNanos / 100 ).iterator ();
100+ jitterNanos = ThreadLocalRandom . current ().longs (0 , pollingIntervalNanos / 100 ).iterator ();
100101
101102 // Execute first update right away on the executor thread.
102103 executor .execute (this ::getAndUpdateSampler );
You can’t perform that action at this time.
0 commit comments