remove Sentry

This commit is contained in:
Matthias Kretschmann 2018-05-24 10:04:45 +02:00
parent eb0aad0fe1
commit 8a9671813c
Signed by: m
GPG Key ID: 606EEEF3C479A91F
5 changed files with 2 additions and 57 deletions

View File

@ -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() {

View File

@ -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.',

View File

@ -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');

View File

@ -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;
}

View File

@ -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",