-
-
Notifications
You must be signed in to change notification settings - Fork 399
/
sentry.default.config.js
35 lines (32 loc) · 1.95 KB
/
sentry.default.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import * as Sentry from '@sentry/nextjs';
// Default scope
Sentry.configureScope(scope => {
scope.setTag('nodejs', process.version);
scope.setTag('runtimeEngine', typeof window !== 'undefined' ? 'browser' : 'server');
});
export default {
dsn: process.env.SENTRY_DSN,
environment: process.env.OC_ENV,
attachStacktrace: true,
enabled: process.env.NODE_ENV !== 'test',
ignoreErrors: [
/\[Please ignore this error\]/, // See `IgnorableError`
'Non-Error promise rejection captured with value: Object Not Found Matching Id', // See https://forum.sentry.io/t/unhandledrejection-non-error-promise-rejection-captured-with-value/14062/17
'Non-Error promise rejection captured with value: null', // See https://forum.sentry.io/t/unhandledrejection-non-error-promise-rejection-captured-with-value/14062/17
/instantSearchSDKJSBridgeClearHighlight/, // Bug on Edge for IOS, see https://stackoverflow.com/questions/69261499/what-is-instantsearchsdkjsbridgeclearhighlight
/^No collective found with slug/, // We throw exceptions for these, but they're not really errors
/Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this/, // Creates a lot of noise in Sentry but it does not seem to have a real impact
/Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive/,
'ResizeObserver loop limit exceeded',
'ResizeObserver loop completed with undelivered notifications.',
'globalThis is not defined', // Happens on old browsers, see https://caniuse.com/?search=globalThis
"Can't find variable: globalThis", // Happens on old browsers, see https://caniuse.com/?search=globalThis
],
denyUrls: [
// Chrome extensions
/extensions\//i,
/^chrome:\/\//i,
/^chrome-extension:\/\//i,
],
tracesSampleRate: process.env.SENTRY_TRACES_SAMPLE_RATE ? parseFloat(process.env.SENTRY_TRACES_SAMPLE_RATE) : 0.01,
};