Skip to content

Commit fc373de

Browse files
committed
naming
1 parent 8bb267b commit fc373de

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/browser/src/tracing/request.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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));

0 commit comments

Comments
 (0)