diff --git a/tests/tracing/test_propagation.py b/tests/tracing/test_propagation.py index ef1d4e376a..e521c5f79e 100644 --- a/tests/tracing/test_propagation.py +++ b/tests/tracing/test_propagation.py @@ -31,6 +31,15 @@ def test_span_in_transaction(sentry_init): next(span.iter_headers()) +def test_span_in_transaction_span_streaming(sentry_init): + sentry_init(traces_sample_rate=1.0, _experiments={"trace_lifecycle": "stream"}) + + with sentry_sdk.traces.start_span(name="test"): + with sentry_sdk.traces.start_span(name="test2") as span: + # Ensure the headers are there + next(span._iter_headers()) + + def test_span_in_span_in_transaction(sentry_init): sentry_init(traces_sample_rate=1.0) @@ -39,3 +48,13 @@ def test_span_in_span_in_transaction(sentry_init): with sentry_sdk.start_span(op="test3") as span_inner: # Ensure the headers are there next(span_inner.iter_headers()) + + +def test_span_in_span_in_transaction_span_streaming(sentry_init): + sentry_init(traces_sample_rate=1.0, _experiments={"trace_lifecycle": "stream"}) + + with sentry_sdk.traces.start_span(name="test"): + with sentry_sdk.traces.start_span(name="test2"): + with sentry_sdk.traces.start_span(name="test3") as span_inner: + # Ensure the headers are there + next(span_inner._iter_headers())