Skip to content

Commit 4bccfd1

Browse files
committed
fix: Force segments where there were transactions
1 parent 3971a12 commit 4bccfd1

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

sentry_sdk/integrations/aiohttp.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ async def sentry_app_handle(
184184
**client_address_attributes,
185185
**header_attributes,
186186
},
187+
parent_span=None,
187188
)
188189
else:
189190
transaction = continue_trace(

sentry_sdk/integrations/asgi.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,9 @@ async def _run_app(
263263

264264
attributes["sentry.op"] = f"{ty}.server"
265265
segment = sentry_sdk.traces.start_span(
266-
name=transaction_name, attributes=attributes
266+
name=transaction_name,
267+
attributes=attributes,
268+
parent_span=None,
267269
)
268270
else:
269271
sentry_sdk.traces.new_trace()
@@ -274,7 +276,9 @@ async def _run_app(
274276

275277
attributes["sentry.op"] = OP.HTTP_SERVER
276278
segment = sentry_sdk.traces.start_span(
277-
name=transaction_name, attributes=attributes
279+
name=transaction_name,
280+
attributes=attributes,
281+
parent_span=None,
278282
)
279283

280284
span_ctx = segment or nullcontext()

sentry_sdk/integrations/wsgi.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ def __call__(
141141
"sentry.origin": self.span_origin,
142142
"sentry.op": OP.HTTP_SERVER,
143143
},
144+
parent_span=None,
144145
)
145146
else:
146147
transaction = continue_trace(

0 commit comments

Comments
 (0)