1111 capture_message ,
1212 start_span ,
1313 start_transaction ,
14+ continue_trace ,
1415)
1516from sentry_sdk .consts import SPANSTATUS
1617from sentry_sdk .transport import Transport
17- from sentry_sdk .tracing import Transaction
1818
1919
2020@pytest .mark .parametrize ("sample_rate" , [0.0 , 1.0 ])
@@ -57,9 +57,7 @@ def test_basic(sentry_init, capture_events, sample_rate):
5757
5858@pytest .mark .parametrize ("parent_sampled" , [True , False , None ])
5959@pytest .mark .parametrize ("sample_rate" , [0.0 , 1.0 ])
60- def test_continue_from_headers (
61- sentry_init , capture_envelopes , parent_sampled , sample_rate
62- ):
60+ def test_continue_trace (sentry_init , capture_envelopes , parent_sampled , sample_rate ):
6361 """
6462 Ensure data is actually passed along via headers, and that they are read
6563 correctly.
@@ -83,7 +81,7 @@ def test_continue_from_headers(
8381 )
8482
8583 # child transaction, to prove that we can read 'sentry-trace' header data correctly
86- child_transaction = Transaction . continue_from_headers (headers , name = "WRONG" )
84+ child_transaction = continue_trace (headers , name = "WRONG" )
8785 assert child_transaction is not None
8886 assert child_transaction .parent_sampled == parent_sampled
8987 assert child_transaction .trace_id == old_span .trace_id
@@ -172,7 +170,7 @@ def test_dynamic_sampling_head_sdk_creates_dsc(
172170
173171 # make sure transaction is sampled for both cases
174172 with mock .patch ("sentry_sdk.tracing_utils.Random.randrange" , return_value = 250000 ):
175- transaction = Transaction . continue_from_headers ({}, name = "Head SDK tx" )
173+ transaction = continue_trace ({}, name = "Head SDK tx" )
176174
177175 # will create empty mutable baggage
178176 baggage = transaction ._baggage
@@ -291,7 +289,7 @@ def capture_event(self, event):
291289def test_trace_propagation_meta_head_sdk (sentry_init ):
292290 sentry_init (traces_sample_rate = 1.0 , release = "foo" )
293291
294- transaction = Transaction . continue_from_headers ({}, name = "Head SDK tx" )
292+ transaction = continue_trace ({}, name = "Head SDK tx" )
295293 meta = None
296294 span = None
297295
0 commit comments