Skip to content

Commit bab31d4

Browse files
committed
Filter more errors from sentry
1 parent fa00d7c commit bab31d4

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

packages/common/src/utils/analytics.ts

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,19 @@ export async function initializeSentry(dsn: string) {
102102
if (
103103
event.stacktrace &&
104104
event.stacktrace.frames &&
105-
event.stacktrace.frames[0] &&
106-
event.stacktrace.frames[0].filename.endsWith(
107-
'codesandbox.editor.main.js'
108-
)
105+
event.stacktrace.frames[0]
109106
) {
110-
// This is the spammy event that doesn't do anything: https://sentry.io/organizations/codesandbox/issues/1054971728/?project=155188&query=is%3Aunresolved
111-
// Don't do anything with it right now, I can't seem to reproduce it for some reason.
112-
// We need to add sourcemaps
113-
return undefined;
107+
const { filename } = event.stacktrace.frames[0];
108+
109+
if (
110+
filename.endsWith('codesandbox.editor.main.js') ||
111+
filename.startsWith('/extensions/')
112+
) {
113+
// This is the spammy event that doesn't do anything: https://sentry.io/organizations/codesandbox/issues/1054971728/?project=155188&query=is%3Aunresolved
114+
// Don't do anything with it right now, I can't seem to reproduce it for some reason.
115+
// We need to add sourcemaps
116+
return undefined;
117+
}
114118
}
115119

116120
const customError = ((hint && (hint.originalException as any)) || {})

0 commit comments

Comments
 (0)