@@ -27,8 +27,8 @@ def test_dsc_head_of_trace(sentry_init, capture_envelopes):
2727 )
2828 envelopes = capture_envelopes ()
2929
30- # We start a new transaction
31- with sentry_sdk .start_transaction (name = "foo" ):
30+ # We start a new root_span
31+ with sentry_sdk .start_span (name = "foo" ):
3232 pass
3333
3434 assert len (envelopes ) == 1
@@ -95,10 +95,10 @@ def test_dsc_continuation_of_trace(sentry_init, capture_envelopes):
9595 "HTTP_BAGGAGE" : baggage ,
9696 }
9797
98- # We continue the incoming trace and start a new transaction
99- transaction = sentry_sdk .continue_trace (incoming_http_headers )
100- with sentry_sdk .start_transaction ( transaction , name = "foo" ):
101- pass
98+ # We continue the incoming trace and start a new root span
99+ with sentry_sdk .continue_trace (incoming_http_headers ):
100+ with sentry_sdk .start_span ( name = "foo" ):
101+ pass
102102
103103 assert len (envelopes ) == 1
104104
@@ -145,7 +145,7 @@ def test_dsc_issue(sentry_init, capture_envelopes):
145145 )
146146 envelopes = capture_envelopes ()
147147
148- # No transaction is started, just an error is captured
148+ # No root span is started, just an error is captured
149149 try :
150150 1 / 0
151151 except ZeroDivisionError as exp :
@@ -181,8 +181,8 @@ def test_dsc_issue(sentry_init, capture_envelopes):
181181
182182def test_dsc_issue_with_tracing (sentry_init , capture_envelopes ):
183183 """
184- Our service has tracing enabled and an error occurs in an transaction .
185- Envelopes containing errors also have the same DSC than the transaction envelopes.
184+ Our service has tracing enabled and an error occurs in an root span .
185+ Envelopes containing errors also have the same DSC than the root span envelopes.
186186 """
187187 sentry_init (
188188 dsn = "https://[email protected] /12312012" ,
@@ -192,8 +192,8 @@ def test_dsc_issue_with_tracing(sentry_init, capture_envelopes):
192192 )
193193 envelopes = capture_envelopes ()
194194
195- # We start a new transaction and an error occurs
196- with sentry_sdk .start_transaction (name = "foo" ):
195+ # We start a new root span and an error occurs
196+ with sentry_sdk .start_span (name = "foo" ):
197197 try :
198198 1 / 0
199199 except ZeroDivisionError as exp :
@@ -239,7 +239,7 @@ def test_dsc_issue_with_tracing(sentry_init, capture_envelopes):
239239 "traces_sample_rate" ,
240240 [
241241 0 , # no traces will be started, but if incoming traces will be continued (by our instrumentations, not happening in this test)
242- None , # no tracing at all. This service will never create transactions .
242+ None , # no tracing at all. This service will never create root spans .
243243 ],
244244)
245245def test_dsc_issue_twp (sentry_init , capture_envelopes , traces_sample_rate ):
@@ -278,14 +278,14 @@ def test_dsc_issue_twp(sentry_init, capture_envelopes, traces_sample_rate):
278278 }
279279
280280 # We continue the trace (meaning: saving the incoming trace information on the scope)
281- # but in this test, we do not start a transaction .
282- sentry_sdk .continue_trace (incoming_http_headers )
281+ # but in this test, we do not start a root span .
282+ with sentry_sdk .continue_trace (incoming_http_headers ):
283283
284- # No transaction is started, just an error is captured
285- try :
286- 1 / 0
287- except ZeroDivisionError as exp :
288- sentry_sdk .capture_exception (exp )
284+ # No root span is started, just an error is captured
285+ try :
286+ 1 / 0
287+ except ZeroDivisionError as exp :
288+ sentry_sdk .capture_exception (exp )
289289
290290 assert len (envelopes ) == 1
291291
0 commit comments