mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-26 01:19:11 +00:00
refactor: cleanup sentry errors (#653)
This commit is contained in:
@@ -12,13 +12,38 @@ import './index.scss';
|
|||||||
const container = document.getElementById('root');
|
const container = document.getElementById('root');
|
||||||
const root = createRoot(container as Element);
|
const root = createRoot(container as Element);
|
||||||
|
|
||||||
|
// https://docs.sentry.io/platforms/javascript/configuration/filtering/#decluttering-sentry
|
||||||
|
const sentryRecommendedIgnore = [
|
||||||
|
// Random plugins/extensions
|
||||||
|
'top.GLOBALS',
|
||||||
|
// See: http://blog.errorception.com/2012/03/tale-of-unfindable-js-error.html
|
||||||
|
'originalCreateNotification',
|
||||||
|
'canvas.contentDocument',
|
||||||
|
'MyApp_RemoveAllHighlights',
|
||||||
|
'http://tt.epicplay.com',
|
||||||
|
"Can't find variable: ZiteReader",
|
||||||
|
'jigsaw is not defined',
|
||||||
|
'ComboSearch is not defined',
|
||||||
|
'http://loading.retry.widdit.com/',
|
||||||
|
'atomicFindClose',
|
||||||
|
// Facebook borked
|
||||||
|
'fb_xd_fragment',
|
||||||
|
// ISP "optimizing" proxy - `Cache-Control: no-transform` seems to
|
||||||
|
// reduce this. (thanks @acdha)
|
||||||
|
// See http://stackoverflow.com/questions/4113268
|
||||||
|
'bmi_SafeAddOnload',
|
||||||
|
'EBCallBackMessageReceived',
|
||||||
|
// See http://toolbar.conduit.com/Developer/HtmlAndGadget/Methods/JSInjection.aspx
|
||||||
|
'conduitPage',
|
||||||
|
];
|
||||||
|
|
||||||
Sentry.init({
|
Sentry.init({
|
||||||
dsn: 'https://5e4d2c4b57ab409cb98d4c08b2014755@o4504288369836032.ingest.sentry.io/4504288371343360',
|
dsn: 'https://5e4d2c4b57ab409cb98d4c08b2014755@o4504288369836032.ingest.sentry.io/4504288371343360',
|
||||||
integrations: [new BrowserTracing()],
|
integrations: [new BrowserTracing()],
|
||||||
tracesSampleRate: 0.3,
|
tracesSampleRate: 0.3,
|
||||||
release: ONTIME_VERSION,
|
release: ONTIME_VERSION,
|
||||||
enabled: import.meta.env.PROD,
|
enabled: import.meta.env.PROD,
|
||||||
ignoreErrors: ['top.GLOBALS', 'Unable to preload CSS', 'Failed to fetch dynamically imported module'],
|
ignoreErrors: [...sentryRecommendedIgnore, 'Unable to preload CSS', 'Failed to fetch dynamically imported module'],
|
||||||
denyUrls: [/extensions\//i, /^chrome:\/\//i, /^chrome-extension:\/\//i],
|
denyUrls: [/extensions\//i, /^chrome:\/\//i, /^chrome-extension:\/\//i],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user