Skip to content

Commit

Permalink
fix authority url
Browse files Browse the repository at this point in the history
  • Loading branch information
Lms24 committed Apr 3, 2023
1 parent a644065 commit 75dbffa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/sveltekit/src/client/load.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ function instrumentSvelteKitFetch(originalFetch: SvelteKitFetch): SvelteKitFetch
const patchedFetchArgs = [input, patchedInit];

if (createSpan) {
U;
fetchPromise = trace(
{
name: `${requestData.method} ${requestData.url}`, // this will become the description of the span
Expand Down
3 changes: 2 additions & 1 deletion packages/utils/src/url.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ export function getSanitizedUrlString(url: PartialURL): string {
(host &&
host
// Always filter out authority
.replace(/^.*:.*@/, '[filtered]:[filtered]@')
// Regex partially taken from: https://stackoverflow.com/a/6165138
.replace(/(?:([^@]*)@)/, '[filtered]:[filtered]@')
// Don't show standard :80 (http) and :443 (https) ports to reduce the noise
.replace(':80', '')
.replace(':443', '')) ||
Expand Down

0 comments on commit 75dbffa

Please sign in to comment.