Merge pull request #2635 from paulkaplan/disable-global-handlers

Disable global error handling for sentry
This commit is contained in:
Paul Kaplan 2019-01-08 14:33:22 -05:00 committed by GitHub
commit ee30377f72
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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
}