@@ -27,8 +27,8 @@ def test_dsc_head_of_trace(sentry_init, capture_envelopes):
27
27
)
28
28
envelopes = capture_envelopes ()
29
29
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" ):
32
32
pass
33
33
34
34
assert len (envelopes ) == 1
@@ -95,10 +95,10 @@ def test_dsc_continuation_of_trace(sentry_init, capture_envelopes):
95
95
"HTTP_BAGGAGE" : baggage ,
96
96
}
97
97
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
102
102
103
103
assert len (envelopes ) == 1
104
104
@@ -145,7 +145,7 @@ def test_dsc_issue(sentry_init, capture_envelopes):
145
145
)
146
146
envelopes = capture_envelopes ()
147
147
148
- # No transaction is started, just an error is captured
148
+ # No root span is started, just an error is captured
149
149
try :
150
150
1 / 0
151
151
except ZeroDivisionError as exp :
@@ -181,8 +181,8 @@ def test_dsc_issue(sentry_init, capture_envelopes):
181
181
182
182
def test_dsc_issue_with_tracing (sentry_init , capture_envelopes ):
183
183
"""
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.
186
186
"""
187
187
sentry_init (
188
188
dsn = "https://mysecret@bla.ingest.sentry.io/12312012" ,
@@ -192,8 +192,8 @@ def test_dsc_issue_with_tracing(sentry_init, capture_envelopes):
192
192
)
193
193
envelopes = capture_envelopes ()
194
194
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" ):
197
197
try :
198
198
1 / 0
199
199
except ZeroDivisionErro
6D4E
r as exp :
@@ -239,7 +239,7 @@ def test_dsc_issue_with_tracing(sentry_init, capture_envelopes):
239
239
"traces_sample_rate" ,
240
240
[
241
241
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 .
243
243
],
244
244
)
245
245
def 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):
278
278
}
279
279
280
280
# 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 ):
283
283
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 )
289
289
290
290
assert len (envelopes ) == 1
291
291
0 commit comments