Disable global handlers

This commit is contained in:
Paul Kaplan 2019-01-08 14:19:11 -05:00
parent 384d6148e0
commit 885977e554

View file

@ -38,7 +38,10 @@ const localStorageAvailable = 'localStorage' in window && window.localStorage !=
const Sentry = require('@sentry/browser');
if (`${process.env.SENTRY_DSN}` !== '') {
Sentry.init({
dsn: `${process.env.SENTRY_DSN}`
dsn: `${process.env.SENTRY_DSN}`,
integrations: integrations =>
// Do not collect global onerror, only collect specifically from React error boundaries.
integrations.filter(i => i.name !== 'GlobalHandlers')
});
window.Sentry = Sentry; // Allow GUI access to Sentry via window
}