Skip to content

Commit e369d04

Browse files
committed
test: Add streaming propagation tests
1 parent 59d643d commit e369d04

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

tests/tracing/test_propagation.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,15 @@ def test_span_in_transaction(sentry_init):
3131
next(span.iter_headers())
3232

3333

34+
def test_span_in_transaction_span_streaming(sentry_init):
35+
sentry_init(traces_sample_rate=1.0, _experiments={"trace_lifecycle": "stream"})
36+
37+
with sentry_sdk.traces.start_span(name="test"):
38+
with sentry_sdk.traces.start_span(name="test2") as span:
39+
# Ensure the headers are there
40+
next(span._iter_headers())
41+
42+
3443
def test_span_in_span_in_transaction(sentry_init):
3544
sentry_init(traces_sample_rate=1.0)
3645

@@ -39,3 +48,13 @@ def test_span_in_span_in_transaction(sentry_init):
3948
with sentry_sdk.start_span(op="test3") as span_inner:
4049
# Ensure the headers are there
4150
next(span_inner.iter_headers())
51+
52+
53+
def test_span_in_span_in_transaction_span_streaming(sentry_init):
54+
sentry_init(traces_sample_rate=1.0, _experiments={"trace_lifecycle": "stream"})
55+
56+
with sentry_sdk.traces.start_span(name="test"):
57+
with sentry_sdk.traces.start_span(name="test2"):
58+
with sentry_sdk.traces.start_span(name="test3") as span_inner:
59+
# Ensure the headers are there
60+
next(span_inner._iter_headers())

0 commit comments

Comments
 (0)