File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
packages/browser/src/tracing Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -274,6 +274,8 @@ export const browserTracingIntegration = ((_options: Partial<BrowserTracingOptio
274
274
beforeSpanEnd : span => {
275
275
_collectWebVitals ( ) ;
276
276
addPerformanceEntries ( span , { recordClsOnPageloadSpan : ! enableStandaloneClsSpans } ) ;
277
+
278
+ setActiveIdleSpan ( client , undefined ) ;
277
279
} ,
278
280
} ) ;
279
281
@@ -491,9 +493,9 @@ function registerInteractionListener(
491
493
const registerInteractionTransaction = ( ) : void => {
492
494
const op = 'ui.action.click' ;
493
495
494
- const rootSpan = getActiveIdleSpan ( client ) ;
495
- if ( rootSpan ) {
496
- const currentRootSpanOp = spanToJSON ( rootSpan ) . op ;
496
+ const activeIdleSpan = getActiveIdleSpan ( client ) ;
497
+ if ( activeIdleSpan ) {
498
+ const currentRootSpanOp = spanToJSON ( activeIdleSpan ) . op ;
497
499
if ( [ 'navigation' , 'pageload' ] . includes ( currentRootSpanOp as string ) ) {
498
500
DEBUG_BUILD &&
499
501
logger . warn ( `[Tracing] Did not create ${ op } span because a pageload or navigation span is in progress.` ) ;
@@ -539,6 +541,6 @@ function getActiveIdleSpan(client: Client): Span | undefined {
539
541
return ( client as { [ ACTIVE_IDLE_SPAN_PROPERTY ] ?: Span } ) [ ACTIVE_IDLE_SPAN_PROPERTY ] ;
540
542
}
541
543
542
- function setActiveIdleSpan ( client : Client , span : Span ) : void {
544
+ function setActiveIdleSpan ( client : Client , span : Span | undefined ) : void {
543
545
addNonEnumerableProperty ( client , ACTIVE_IDLE_SPAN_PROPERTY , span ) ;
544
546
}
You can’t perform that action at this time.
0 commit comments