Skip to content

Commit ad70524

Browse files
committed
fix(aiohttp): Correctly apply transaction/segment name
1 parent 8e6d73b commit ad70524

1 file changed

Lines changed: 5 additions & 15 deletions

File tree

sentry_sdk/integrations/aiohttp.py

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -339,21 +339,11 @@ async def sentry_urldispatcher_resolve(
339339
pass
340340

341341
if name is not None:
342-
current_span = sentry_sdk.get_current_span()
343-
if isinstance(current_span, StreamedSpan) and not isinstance(
344-
current_span, NoOpStreamedSpan
345-
):
346-
current_span._segment.name = name
347-
current_span._segment.set_attribute(
348-
"sentry.segment.name.source",
349-
SEGMENT_SOURCE_FOR_STYLE[integration.transaction_style].value,
350-
)
351-
else:
352-
current_scope = sentry_sdk.get_current_scope()
353-
current_scope.set_transaction_name(
354-
name,
355-
source=SOURCE_FOR_STYLE[integration.transaction_style],
356-
)
342+
current_scope = sentry_sdk.get_current_scope()
343+
current_scope.set_transaction_name(
344+
name,
345+
source=SOURCE_FOR_STYLE[integration.transaction_style],
346+
)
357347

358348
return rv
359349

0 commit comments

Comments
 (0)