@@ -74,7 +74,7 @@ async def test_create_task(
74
74
75
75
events = capture_events ()
76
76
77
- with sentry_sdk .start_transaction (name = "test_transaction_for_create_task" ):
77
+ with sentry_sdk .start_span (name = "test_transaction_for_create_task" ):
78
78
with sentry_sdk .start_span (op = "root" , name = "not so important" ):
79
79
tasks = [event_loop .create_task (foo ()), event_loop .create_task (bar ())]
80
80
await asyncio .wait (tasks , return_when = asyncio .FIRST_EXCEPTION )
@@ -117,7 +117,7 @@ async def test_gather(
117
117
118
118
events = capture_events ()
119
119
120
- with sentry_sdk .start_transaction (name = "test_transaction_for_gather" ):
120
+ with sentry_sdk .start_span (name = "test_transaction_for_gather" ):
121
121
with sentry_sdk .start_span (op = "root" , name = "not so important" ):
122
122
await asyncio .gather (foo (), bar (), return_exceptions = True )
123
123
@@ -160,7 +160,8 @@ async def test_exception(
160
160
161
161
events = capture_events ()
162
162
163
- with sentry_sdk .start_transaction (name = "test_exception" ):
163
+ with sentry_sdk .start_span (name = "test_exception" ):
164
+ sentry_sdk .get_isolation_scope ().set_transaction_name ("test_exception" )
164
165
with sentry_sdk .start_span (op = "root" , name = "not so important" ):
165
166
tasks = [event_loop .create_task (boom ()), event_loop .create_task (bar ())]
166
167
await asyncio .wait (tasks , return_when = asyncio .FIRST_EXCEPTION )
@@ -375,7 +376,7 @@ async def test_span_origin(
375
376
376
377
events = capture_events ()
377
378
378
- with sentry_sdk .start_transaction (name = "something" ):
379
+ with sentry_sdk .start_span (name = "something" ):
379
380
tasks = [
380
381
event_loop .create_task (foo ()),
381
382
]
0 commit comments