summaryrefslogtreecommitdiff
path: root/frontend/src/index.js
diff options
context:
space:
mode:
authorFabian Mastenbroek <mail.fabianm@gmail.com>2020-11-11 00:51:23 +0100
committerGitHub <noreply@github.com>2020-11-11 00:51:23 +0100
commite1716ee419c218f879c046917eaeb1e566230b0e (patch)
tree399969e871ef89f427707c927ff5e65d4c14eba8 /frontend/src/index.js
parentf3f8d1d494a08a032940c6587c7865cd0ac0dd7a (diff)
parente6c36a309c7372bb0de3ae4a3277e91c1ee4913b (diff)
Merge pull request #62 from atlarge-research/bug/tutorial
Implement various fixes in preparation for tutorial
Diffstat (limited to 'frontend/src/index.js')
-rw-r--r--frontend/src/index.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/frontend/src/index.js b/frontend/src/index.js
index 0971b1e6..fe119dfb 100644
--- a/frontend/src/index.js
+++ b/frontend/src/index.js
@@ -1,5 +1,7 @@
import React from 'react'
import ReactDOM from 'react-dom'
+import * as Sentry from '@sentry/react'
+import { Integrations } from '@sentry/tracing'
import { Provider } from 'react-redux'
import { setupSocketConnection } from './api/socket'
import './index.sass'
@@ -9,6 +11,16 @@ import configureStore from './store/configure-store'
setupSocketConnection(() => {
const store = configureStore()
+ // Initialize Sentry if the user has configured a DSN
+ if (process.env.REACT_APP_SENTRY_DSN) {
+ Sentry.init({
+ environment: process.env.NODE_ENV,
+ dsn: process.env.REACT_APP_SENTRY_DSN,
+ integrations: [new Integrations.BrowserTracing()],
+ tracesSampleRate: 0.5,
+ })
+ }
+
ReactDOM.render(
<Provider store={store}>
<Routes />