From 17efbe196429acc291c877d21f027c814d419d12 Mon Sep 17 00:00:00 2001 From: Charis <26616127+charislam@users.noreply.github.com> Date: Fri, 23 May 2025 14:53:05 -0400 Subject: [PATCH] chore(docs): loosen overly strict sentry filter (#35882) Should've double-checked this before applying the filter =_=""" but apparently filtering out `app:///` also filters out legitimate events, since those files are prefixed by `app:///` as well. Instead let's keep only `app:///_next` since that should include all our static JS assets. --- apps/docs/instrumentation-client.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/docs/instrumentation-client.ts b/apps/docs/instrumentation-client.ts index cefe0fbfc80..86fc0cd1a4b 100644 --- a/apps/docs/instrumentation-client.ts +++ b/apps/docs/instrumentation-client.ts @@ -22,8 +22,11 @@ if (!IS_DEV) { beforeSend(event) { const frames = event.exception?.values?.[0].stacktrace?.frames || [] - // Drop errors originating from user apps or extensions as unactionable - if (frames.some((frame) => frame.filename && frame.filename.startsWith('app:///'))) { + // Drop errors not originating from docs app static files as unactionable + if ( + frames && + !frames.some((frame) => frame.filename && frame.filename.startsWith('app:///_next')) + ) { return null }