Skip to content

Commit 27c0f8f

Browse files
Update src/Tracing/PropagationContext.php
Co-authored-by: Daniel Szoke <[email protected]>
1 parent bb48fed commit 27c0f8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Tracing/PropagationContext.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ private static function parseTraceparentAndBaggage(string $traceparent, string $
247247
// [0, rate)
248248
$context->sampleRand = round(mt_rand(0, mt_getrandmax() - 1) / mt_getrandmax() * (float) $samplingContext->get('sample_rate'), 6);
249249
} else {
250-
// [rate, 1]
250+
// [rate, 1)
251251
$context->sampleRand = round(mt_rand(0, mt_getrandmax() - 1) / mt_getrandmax() * (1 - (float) $samplingContext->get('sample_rate')) + (float) $samplingContext->get('sample-rate'), 6);
252252
}
253253
} elseif ($context->parentSampled !== null) {

0 commit comments

Comments
 (0)