updated sentry libs from raven to @sentry
This commit is contained in:
parent
927c981cd7
commit
807ecff471
9 changed files with 106 additions and 71 deletions
|
@ -76,7 +76,7 @@ export default function(state, emitter) {
|
|||
state.storage.remove(ownedFile.id);
|
||||
await ownedFile.del();
|
||||
} catch (e) {
|
||||
state.raven.captureException(e);
|
||||
state.sentry.captureException(e);
|
||||
}
|
||||
render();
|
||||
});
|
||||
|
@ -181,9 +181,10 @@ export default function(state, emitter) {
|
|||
} else {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error(err);
|
||||
state.raven.captureException(err, {
|
||||
duration: err.duration,
|
||||
size: err.size
|
||||
state.sentry.withScope(scope => {
|
||||
scope.setExtra('duration', err.duration);
|
||||
scope.setExtra('size', err.size);
|
||||
state.sentry.captureException(err);
|
||||
});
|
||||
metrics.stoppedUpload(archive, err.duration);
|
||||
emitter.emit('pushState', '/error');
|
||||
|
@ -264,10 +265,11 @@ export default function(state, emitter) {
|
|||
state.transfer = null;
|
||||
const location = err.message === '404' ? '/404' : '/error';
|
||||
if (location === '/error') {
|
||||
state.raven.captureException(err, {
|
||||
duration: err.duration,
|
||||
size: err.size,
|
||||
progress: err.progress
|
||||
state.sentry.withScope(scope => {
|
||||
scope.setExtra('duration', err.duration);
|
||||
scope.setExtra('size', err.size);
|
||||
scope.setExtra('progress', err.progress);
|
||||
state.sentry.captureException(err);
|
||||
});
|
||||
const duration = Date.now() - start;
|
||||
metrics.stoppedDownload({
|
||||
|
|
|
@ -12,15 +12,15 @@ import pasteManager from './pasteManager';
|
|||
import storage from './storage';
|
||||
import metrics from './metrics';
|
||||
import experiments from './experiments';
|
||||
import Raven from 'raven-js';
|
||||
import * as Sentry from '@sentry/browser';
|
||||
import './main.css';
|
||||
import User from './user';
|
||||
import { getTranslator } from './locale';
|
||||
import Archive from './archive';
|
||||
import { setTranslate, locale } from './utils';
|
||||
|
||||
if (navigator.doNotTrack !== '1' && window.RAVEN_CONFIG) {
|
||||
Raven.config(window.SENTRY_ID, window.RAVEN_CONFIG).install();
|
||||
if (navigator.doNotTrack !== '1' && window.SENTRY_CONFIG) {
|
||||
Sentry.init(window.SENTRY_CONFIG);
|
||||
}
|
||||
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
|
@ -56,7 +56,7 @@ if (process.env.NODE_ENV === 'production') {
|
|||
capabilities,
|
||||
translate,
|
||||
storage,
|
||||
raven: Raven,
|
||||
sentry: Sentry,
|
||||
user: new User(storage, LIMITS, window.AUTH_CONFIG),
|
||||
transfer: null,
|
||||
fileInfo: null
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue