Skip to content

Commit 28a54db

Browse files
committed
Addin the sentry init block and importing the deps, adding the public sentry env variable to the env file
1 parent 73f2313 commit 28a54db

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

.env

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@ NEXT_PUBLIC_SCIENTIST_API_VERSION=v2
88
# values to use for testing
99
TEST_SCIENTIST_USER=[email protected]
1010
TEST_SCIENTIST_PW=!test1234
11+
12+
SENTRY_DSN=https://[email protected]/4504805305810944

pages/_app.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { Integrations } from '@sentry/tracing'
2+
import * as Sentry from '@sentry/react'
13
import { Footer, Header } from '@scientist-softserv/webstore-component-library'
24
import { SWRConfig } from 'swr'
35
import {
@@ -17,6 +19,14 @@ import {
1719
} from '../utils'
1820
import '../utils/theme/globals.scss'
1921

22+
Sentry.init({
23+
dsn: process.env.SENTRY_DSN,
24+
integrations: [
25+
new Integrations.BrowserTracing(),
26+
],
27+
tracesSampleRate: 1.0,
28+
})
29+
2030
const WebStore = ({ Component }) => {
2131
const { data: session } = useSession()
2232

0 commit comments

Comments
 (0)