mirror of
https://github.com/ascribe/onion.git
synced 2024-12-22 09:23:13 +01:00
remove Sentry
This commit is contained in:
parent
eb0aad0fe1
commit
8a9671813c
@ -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() {
|
||||
|
@ -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.',
|
||||
|
33
js/third_party/raven_handler.js
vendored
33
js/third_party/raven_handler.js
vendored
@ -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');
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user