Skip to content

Commit 1332ebc

Browse files
committed
facepalm
1 parent 3d4953e commit 1332ebc

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

sentry_sdk/integrations/opentelemetry/sampler.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import random
21
from decimal import Decimal
32
from typing import cast
43

@@ -265,7 +264,7 @@ def should_sample(
265264

266265
# Roll the dice on sample rate
267266
sample_rate = float(cast("Union[bool, float, int]", sample_rate))
268-
sampled = random.random() < sample_rate
267+
sampled = sample_rand < sample_rate
269268

270269
if sampled:
271270
return sampled_result(

0 commit comments

Comments
 (0)