diff --git a/apps/client/src/index.tsx b/apps/client/src/index.tsx index 043172be6..08b5f233b 100644 --- a/apps/client/src/index.tsx +++ b/apps/client/src/index.tsx @@ -12,13 +12,38 @@ import './index.scss'; const container = document.getElementById('root'); 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({ dsn: 'https://5e4d2c4b57ab409cb98d4c08b2014755@o4504288369836032.ingest.sentry.io/4504288371343360', integrations: [new BrowserTracing()], tracesSampleRate: 0.3, release: ONTIME_VERSION, 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], });