From 8a9671813c8ab6ba45bda67b195b18303f970f7f Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Thu, 24 May 2018 10:04:45 +0200 Subject: [PATCH] remove Sentry --- js/app.js | 2 -- js/constants/application_constants.js | 3 --- js/third_party/raven_handler.js | 33 --------------------------- js/utils/error_utils.js | 20 ++-------------- package.json | 1 - 5 files changed, 2 insertions(+), 57 deletions(-) delete mode 100644 js/third_party/raven_handler.js diff --git a/js/app.js b/js/app.js index 26dc34d6..f6c877cf 100644 --- a/js/app.js +++ b/js/app.js @@ -25,8 +25,6 @@ import EventActions from './actions/event_actions'; // You can comment out the modules you don't need // import DebugHandler from './third_party/debug_handler'; import NotificationsHandler from './third_party/notifications_handler'; -import RavenHandler from './third_party/raven_handler'; - const AppGateway = { start() { diff --git a/js/constants/application_constants.js b/js/constants/application_constants.js index 504676b3..ec26e8e4 100644 --- a/js/constants/application_constants.js +++ b/js/constants/application_constants.js @@ -128,9 +128,6 @@ const constants = { 'sdkUrl': '//vjs.zencdn.net/4.12/video.js', 'cssUrl': '//vjs.zencdn.net/4.12/video-js.css' }, - 'raven': { - 'url': 'https://836bfb71c9c7418a967351d39ce547f0@app.getsentry.com/48351' - }, 'cloudfrontDomain': 'd1qjsxua1o9x03.cloudfront.net', 'errorMessagesToIgnore': [ 'Authentication credentials were not provided.', diff --git a/js/third_party/raven_handler.js b/js/third_party/raven_handler.js deleted file mode 100644 index f294bc95..00000000 --- a/js/third_party/raven_handler.js +++ /dev/null @@ -1,33 +0,0 @@ -'use strict'; - -import { altThirdParty } from '../alt'; -import EventActions from '../actions/event_actions'; - -import Raven from 'raven-js'; - - -class RavenHandler { - constructor() { - this.bindActions(EventActions); - this.loaded = false; - } - - onUserDidAuthenticate(user) { - if (this.loaded) { - return; - } - - Raven.setUserContext({ - email: user.email - }); - console.log('Raven loaded'); - this.loaded = true; - } - - onUserDidLogout() { - Raven.setUserContext(); - this.loaded = false; - } -} - -export default altThirdParty.createStore(RavenHandler, 'RavenHandler'); diff --git a/js/utils/error_utils.js b/js/utils/error_utils.js index 4aa74247..6c2225a6 100644 --- a/js/utils/error_utils.js +++ b/js/utils/error_utils.js @@ -1,18 +1,14 @@ 'use strict'; -import Raven from 'raven-js'; - import AppConstants from '../constants/application_constants'; /** - * Logs an error in to the console but also sends it to - * Sentry. + * Logs an error in to the console. * Optionally, a comment can be defined. * @param {Error} error a Javascript error - * @param {boolean} ignoreSentry Defines whether or not the error should be submitted to Sentry * @param {string} comment Will also be submitted to Sentry, but will not be logged */ -function logGlobal(error, comment, ignoreSentry) { +function logGlobal(error, comment) { console.error(error); if (error.hasOwnProperty('json')) { @@ -21,21 +17,9 @@ function logGlobal(error, comment, ignoreSentry) { json: error.json }; } - - if (!ignoreSentry) { - Raven.captureException(error, comment ? { extra: { comment } } : undefined); - } } export function initLogging() { - // Initialize Raven for logging on Sentry - Raven.config(AppConstants.raven.url, { - release: AppConstants.version, - ignoreErrors: AppConstants.errorMessagesToIgnore - }).install(); - - window.onerror = Raven.process; - console.logGlobal = logGlobal; } diff --git a/package.json b/package.json index 556e24f7..0768e7f4 100644 --- a/package.json +++ b/package.json @@ -105,7 +105,6 @@ "opn": "^3.0.2", "q": "^1.4.1", "query-string": "^3.0.0", - "raven-js": "^1.1.19", "react": "0.13.2", "react-bootstrap": "0.25.1", "react-datepicker": "^0.12.0",