Skip to content

Commit 032a6c4

Browse files
committed
fix test
1 parent e6d1421 commit 032a6c4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/tracing/test_sampling.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,13 @@ def test_inherits_parent_sampling_decision_when_traces_sampler_undefined(
182182
sentry_init(traces_sample_rate=0.5)
183183
mock_random_value = 0.25 if parent_sampling_decision is False else 0.75
184184

185+
sentry_trace_header = (
186+
"12312012123120121231201212312012-1121201211212012-{sampled}".format(
187+
sampled=int(parent_sampling_decision)
188+
)
189+
)
185190
with mock.patch.object(random, "random", return_value=mock_random_value):
186-
with start_span(name="catpark", sampled=parent_sampling_decision):
191+
with sentry_sdk.continue_trace({"sentry-trace": sentry_trace_header}):
187192
with start_span(name="dogpark") as span:
188193
pass
189194

0 commit comments

Comments
 (0)