mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-07 22:50:53 +03:00
updated sentry libs from raven to @sentry
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
const express = require('express');
|
||||
const path = require('path');
|
||||
const Raven = require('raven');
|
||||
const Sentry = require('@sentry/node');
|
||||
const config = require('../config');
|
||||
const routes = require('../routes');
|
||||
const pages = require('../routes/pages');
|
||||
const expressWs = require('@dannycoates/express-ws');
|
||||
|
||||
if (config.sentry_dsn) {
|
||||
Raven.config(config.sentry_dsn).install();
|
||||
Sentry.init({ dsn: config.sentry_dsn });
|
||||
}
|
||||
|
||||
const app = express();
|
||||
|
||||
@@ -8,12 +8,10 @@ if (config.sentry_id) {
|
||||
//eslint-disable-next-line node/no-missing-require
|
||||
const version = require('../dist/version.json');
|
||||
sentry = `
|
||||
var RAVEN_CONFIG = {
|
||||
var SENTRY_CONFIG = {
|
||||
dsn: '${config.sentry_id}',
|
||||
release: '${version.version}',
|
||||
tags: {
|
||||
commit: '${version.commit}'
|
||||
},
|
||||
dataCallback: function (data) {
|
||||
beforeSend: function (data) {
|
||||
var hash = window.location.hash;
|
||||
if (hash) {
|
||||
return JSON.parse(JSON.stringify(data).replace(new RegExp(hash.slice(1), 'g'), ''));
|
||||
@@ -21,7 +19,6 @@ var RAVEN_CONFIG = {
|
||||
return data;
|
||||
}
|
||||
}
|
||||
var SENTRY_ID = '${config.sentry_id}';
|
||||
`;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user