diff --git a/app/assets/javascripts/application.js.coffee b/app/assets/javascripts/application.js.coffee index a98721e56bdf7dcee2eaa467228c996d5ebe0149..d4c399f7be23f66f26243067909713624372ac14 100644 --- a/app/assets/javascripts/application.js.coffee +++ b/app/assets/javascripts/application.js.coffee @@ -296,6 +296,46 @@ $ -> checkInitialSidebarSize() new Aside() - + if gon.sentry_dsn? - Raven.config(gon.sentry_dsn).install() \ No newline at end of file + Raven.config(gon.sentry_dsn, { + 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', + # 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' + ], + ignoreUrls: [ + # Woopra flakiness + /eatdifferent\.com\.woopra-ns\.com/i, + /static\.woopra\.com\/js\/woopra\.js/i, + # Chrome extensions + /extensions\//i, + /^chrome:\/\//i, + # Other plugins + /127\.0\.0\.1:4001\/isrunning/i, # Cacaoweb + /webappstoolbarba\.texthelp\.com\//i, + /metrics\.itunes\.apple\.com\.edgesuite\.net\//i + ] + }).install() + + if gon.current_user_id + Raven.setUserContext({ + api_token: gon.api_token, + id: gon.current_user_id + }) \ No newline at end of file