demarches-normaliennes/app/javascript/shared/sentry.js

15 lines
262 B
JavaScript
Raw Normal View History

2018-08-09 16:45:56 +02:00
import { init, configureScope } from '@sentry/browser';
import { getData } from './data';
const { dsn, email, id } = getData('sentry');
if (dsn) {
init({ dsn });
if (email) {
configureScope(scope => {
scope.setUser({ id, email });
});
}
}