From 6ce0242386681b8d49f64ba9c0d508e8a7bc80c8 Mon Sep 17 00:00:00 2001 From: "a.bouhuolia" Date: Thu, 30 Sep 2021 23:47:04 +0200 Subject: [PATCH] chore: sentry configuration. --- src/index.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/index.js b/src/index.js index ea6c3bf30..7dabfd305 100644 --- a/src/index.js +++ b/src/index.js @@ -3,6 +3,9 @@ import ReactDOM from 'react-dom'; import { Provider } from 'react-redux'; import { BrowserRouter } from 'react-router-dom'; import { PersistGate } from 'redux-persist/integration/react'; +import * as Sentry from '@sentry/react'; +import { Integrations } from '@sentry/tracing'; + import 'services/yup'; import App from 'components/App'; import * as serviceWorker from 'serviceWorker'; @@ -16,6 +19,17 @@ if (process.env.NODE_ENV === 'development') { }); } +if (process.env.NODE_ENV !== 'production') { + Sentry.init({ + dsn: 'https://021bef720bbb4ce2b98f679f72984843@o1021356.ingest.sentry.io/5987236', + integrations: [new Integrations.BrowserTracing()], + // Set tracesSampleRate to 1.0 to capture 100% + // of transactions for performance monitoring. + // We recommend adjusting this value in production + tracesSampleRate: 1.0, + }); +} + ReactDOM.render(