From e369d048d589d1af800ac8d75cf2a68632be8948 Mon Sep 17 00:00:00 2001 From: Ivana Kellyer Date: Wed, 8 Jul 2026 13:40:56 +0200 Subject: [PATCH] test: Add streaming propagation tests --- tests/tracing/test_propagation.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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())