demarches-normaliennes/app/javascript/shared/sentry.js
2018-08-13 11:44:32 +02:00

14 lines
262 B
JavaScript

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