File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121from sentry_sdk .integrations .logging import ignore_logger
2222from sentry_sdk .scope import Scope , should_send_default_pii
2323from sentry_sdk .sessions import track_session
24- from sentry_sdk .traces import (
25- SOURCE_FOR_STYLE as SEGMENT_SOURCE_FOR_STYLE ,
26- )
2724from sentry_sdk .traces import (
2825 NoOpStreamedSpan ,
2926 SegmentNameSource ,
@@ -339,21 +336,11 @@ async def sentry_urldispatcher_resolve(
339336 pass
340337
341338 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- )
339+ current_scope = sentry_sdk .get_current_scope ()
340+ current_scope .set_transaction_name (
341+ name ,
342+ source = SOURCE_FOR_STYLE [integration .transaction_style ],
343+ )
357344
358345 return rv
359346
You can’t perform that action at this time.
0 commit comments