Skip to content

Commit 1b118cf

Browse files
Apply suggestions from code review
Co-authored-by: Daniel Szoke <[email protected]>
1 parent 5db195a commit 1b118cf

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

sentry_sdk/tracing_utils.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -484,8 +484,6 @@ def _fill_sample_rand(self):
484484
f"Failed to convert incoming sample_rate to float: {sample_rate}"
485485
)
486486

487-
# Compute the transformation that will map the random value
488-
# to the desired range: [0, 1), [0, sample_rate), or [sample_rate, 1).
489487
lower, upper = _sample_rand_range(self.parent_sampled, sample_rate)
490488

491489
try:

tests/integrations/opentelemetry/test_propagator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ def test_inject_head_sdk(sentry_init):
201201

202202
with patch(
203203
"sentry_sdk.tracing_utils.Random.uniform",
204-
return_value=decimal.Decimal("0.123456"),
204+
return_value=0.123456,
205205
):
206206
with sentry_sdk.start_span(name="foo") as span:
207207
SentryPropagator().inject(carrier, setter=setter)

tests/integrations/stdlib/test_httplib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ def test_outgoing_trace_headers(
206206
"baggage": (
207207
"other-vendor-value-1=foo;bar;baz, sentry-trace_id=771a43a4192642f0b136d5159a501700, "
208208
"sentry-public_key=49d0f7386ad645858ae85020e393bef3, sentry-sample_rate=0.01337, "
209-
"sentry-user_id=Am%C3%A9lie, sentry-sample_rand=0.00337, other-vendor-value-2=foo;bar;"
209+
"sentry-user_id=Am%C3%A9lie, sentry-sample_rand=0.003370, other-vendor-value-2=foo;bar;"
210210
),
211211
}
212212

0 commit comments

Comments
 (0)