Skip to content

Commit

Permalink
feat: add sentry to react frontend #108
Browse files Browse the repository at this point in the history
  • Loading branch information
nvernooy committed Oct 3, 2023
1 parent 8d69389 commit 50e811e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions {{cookiecutter.project_slug}}/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
]
},
"dependencies": {
"@sentry/browser": "^7.73.0",
"@sentry/tracing": "^7.73.0",
"@tanstack/react-query": "4.20.9",
"axios": "1.2.2",
"localforage": "1.10.0",
Expand Down
10 changes: 10 additions & 0 deletions {{cookiecutter.project_slug}}/frontend/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ import App from './App'
import './index.css'
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'

import * as Sentry from "@sentry/browser";
import { BrowserTracing } from "@sentry/tracing";

Sentry.init({
dsn: `https://${process.env.SENTRY_DSN}`,
integrations: [new BrowserTracing()],

tracesSampleRate: 1.0
});

const queryClient = new QueryClient({
defaultOptions: {
queries: {
Expand Down

0 comments on commit 50e811e

Please # to comment.