File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
packages/browser/src/tracing Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -264,7 +264,7 @@ function addHTTPTimings(span: Span, client: Client): void {
264264 // Clean up the performance observer and other resources
265265 // We have to wait here because otherwise this cleans itself up before it is fully done.
266266 // Default (non-streaming): just deregister the observer.
267- let onEntryFound = ( ) : void => void setTimeout ( cleanup ) ;
267+ let onEntryFound = ( ) : void => void setTimeout ( unsubscribePerformanceObsever ) ;
268268
269269 // For streamed spans, we have to artificially delay the ending of the span until we
270270 // either receive the timing data, or HTTP_TIMING_WAIT_MS elapses.
@@ -280,7 +280,7 @@ function addHTTPTimings(span: Span, client: Client): void {
280280 return ;
281281 }
282282 isEnded = true ;
283- setTimeout ( cleanup ) ;
283+ setTimeout ( unsubscribePerformanceObsever ) ;
284284 originalEnd ( capturedEndTimestamp ) ;
285285 clearTimeout ( fallbackTimeout ) ;
286286 } ;
@@ -294,7 +294,7 @@ function addHTTPTimings(span: Span, client: Client): void {
294294 } ;
295295 }
296296
297- const cleanup = addPerformanceInstrumentationHandler ( 'resource' , ( { entries } ) => {
297+ const unsubscribePerformanceObsever = addPerformanceInstrumentationHandler ( 'resource' , ( { entries } ) => {
298298 entries . forEach ( entry => {
299299 if ( isPerformanceResourceTiming ( entry ) && entry . name . endsWith ( url ) ) {
300300 span . setAttributes ( resourceTimingToSpanAttributes ( entry ) ) ;
You can’t perform that action at this time.
0 commit comments