This repository has been archived by the owner on Apr 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update sentry
- Loading branch information
Showing
7 changed files
with
412 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,39 +6,15 @@ import configureStore from './configureStore'; | |
import { navigate } from './actions'; | ||
import 'bootstrap/dist/js/bootstrap'; | ||
import ReduxToastr from 'react-redux-toastr'; | ||
import Raven from 'raven-js'; | ||
import * as Sentry from '@sentry/browser'; | ||
import { DragDropContext } from 'react-dnd'; | ||
import { default as TouchBackend } from 'react-dnd-touch-backend'; | ||
|
||
import version from './version'; | ||
import ErrorBoundary from './Components/Site/ErrorBoundary'; | ||
|
||
const ravenOptions = { | ||
ignoreErrors: [ | ||
// 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', | ||
'YoukuAntiAds.eval' | ||
], | ||
ignoreUrls: [ | ||
const sentryOptions = { | ||
dsn: 'https://[email protected]/1515148', | ||
denyUrls: [ | ||
// Facebook flakiness | ||
/graph\.facebook\.com/i, | ||
// Facebook blocked | ||
|
@@ -49,17 +25,32 @@ const ravenOptions = { | |
// Chrome extensions | ||
/extensions\//i, | ||
/^chrome:\/\//i, | ||
/chrome-extension:/i, | ||
// Other plugins | ||
/127\.0\.0\.1:4001\/isrunning/i, // Cacaoweb | ||
/webappstoolbarba\.texthelp\.com\//i, | ||
/metrics\.itunes\.apple\.com\.edgesuite\.net\//i, | ||
/YoukuAntiAds\.eval/i | ||
], | ||
release: version.build | ||
beforeSend(event, hint) { | ||
if( | ||
event.message && | ||
event.message.startsWith('Non-Error exception captured') && | ||
hint.originalException.error | ||
) { | ||
Sentry.withScope((scope) => { | ||
scope.setExtra('nonErrorException', true); | ||
Sentry.captureException(hint.originalException.error); | ||
}); | ||
return null; | ||
} | ||
|
||
return event; | ||
}, | ||
release: process.env.VERSION || 'Local build' | ||
}; | ||
|
||
Raven.config('https://[email protected]/123019', ravenOptions) | ||
.install(); | ||
Sentry.init(sentryOptions); | ||
|
||
const store = configureStore(); | ||
|
||
|
Oops, something went wrong.