From df10ac4582f695e021df403071f4d015c4570365 Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Mon, 3 Apr 2023 14:46:35 +0200 Subject: [PATCH] "fix" authority regex again --- packages/sveltekit/src/client/load.ts | 1 - packages/utils/src/url.ts | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/sveltekit/src/client/load.ts b/packages/sveltekit/src/client/load.ts index 871fa4e8a804..daa6df000d86 100644 --- a/packages/sveltekit/src/client/load.ts +++ b/packages/sveltekit/src/client/load.ts @@ -182,7 +182,6 @@ 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 diff --git a/packages/utils/src/url.ts b/packages/utils/src/url.ts index 043d583b59f6..71ce23e63a57 100644 --- a/packages/utils/src/url.ts +++ b/packages/utils/src/url.ts @@ -68,8 +68,7 @@ export function getSanitizedUrlString(url: PartialURL): string { (host && host // Always filter out authority - // Regex partially taken from: https://stackoverflow.com/a/6165138 - .replace(/(?:([^@]*)@)/, '[filtered]:[filtered]@') + .replace(/^.*@/, '[filtered]:[filtered]@') // Don't show standard :80 (http) and :443 (https) ports to reduce the noise .replace(':80', '') .replace(':443', '')) ||