Skip to content

Commit 1fcb045

Browse files
committed
fixup! fix(browser): Apply urlQueryParams to event URLs, static span names and LCP URLs
1 parent 91152a4 commit 1fcb045

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

‎packages/browser-utils/src/performance/entries.ts‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -360,15 +360,15 @@ function _addPerformanceNavigationTiming(
360360
return;
361361
}
362362
const op = NAVIGATION_TIMING_SPAN_OPS[event];
363-
const url = filterCollectedUrl(entry.name);
363+
const filteredUrl = filterCollectedUrl(entry.name);
364364
startAndEndSpan(span, _navigationTimeToSeconds(entry, start), _navigationTimeToSeconds(entry, end), {
365365
// With span streaming, span names have to be low cardinality, so we can't fall back to the
366366
// document URL. `url.full` keeps it, and is what Relay derives the description from.
367-
name: spanStreamingEnabled ? BROWSER_NAVIGATION_TIMING_SPAN_NAMES[op] : url,
367+
name: spanStreamingEnabled ? BROWSER_NAVIGATION_TIMING_SPAN_NAMES[op] : filteredUrl,
368368
attributes: {
369369
[SENTRY_OP]: op,
370370
[SENTRY_ORIGIN]: 'auto.ui.browser.metrics',
371-
[URL_FULL]: url,
371+
[URL_FULL]: filteredUrl,
372372
...(event === 'redirect' && entry.redirectCount != null ? { 'http.redirect_count': entry.redirectCount } : {}),
373373
},
374374
});
@@ -397,23 +397,23 @@ function _addRequest(span: Span, entry: PerformanceNavigationTiming, spanStreami
397397

398398
// With span streaming, span names have to be low cardinality, so we can't fall back to the
399399
// document URL. `url.full` keeps it, and is what Relay derives the description from.
400-
const url = filterCollectedUrl(entry.name);
400+
const filteredUrl = filterCollectedUrl(entry.name);
401401

402402
startAndEndSpan(span, requestStartTimestamp, responseEndTimestamp, {
403-
name: spanStreamingEnabled ? BROWSER_NAVIGATION_TIMING_SPAN_NAMES[BROWSER_REQUEST] : url,
403+
name: spanStreamingEnabled ? BROWSER_NAVIGATION_TIMING_SPAN_NAMES[BROWSER_REQUEST] : filteredUrl,
404404
attributes: {
405405
[SENTRY_OP]: BROWSER_REQUEST,
406406
[SENTRY_ORIGIN]: 'auto.ui.browser.metrics',
407-
[URL_FULL]: url,
407+
[URL_FULL]: filteredUrl,
408408
},
409409
});
410410

411411
startAndEndSpan(span, responseStartTimestamp, responseEndTimestamp, {
412-
name: spanStreamingEnabled ? BROWSER_NAVIGATION_TIMING_SPAN_NAMES[BROWSER_RESPONSE] : url,
412+
name: spanStreamingEnabled ? BROWSER_NAVIGATION_TIMING_SPAN_NAMES[BROWSER_RESPONSE] : filteredUrl,
413413
attributes: {
414414
[SENTRY_OP]: BROWSER_RESPONSE,
415415
[SENTRY_ORIGIN]: 'auto.ui.browser.metrics',
416-
[URL_FULL]: url,
416+
[URL_FULL]: filteredUrl,
417417
},
418418
});
419419
}

0 commit comments

Comments
 (0)