Skip to content

Commit 875e0bd

Browse files
Try disabling React Sentry tracing (#164)
1 parent 41f3087 commit 875e0bd

File tree

2 files changed

+3
-23
lines changed

2 files changed

+3
-23
lines changed

src/App.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import * as React from 'react';
22
import {Link as RouterLink, Route, Routes} from 'react-router-dom';
3-
import * as Sentry from '@sentry/react';
43

54
import {styled} from '@mui/material/styles';
65
import Link from '@mui/material/Link';
@@ -95,8 +94,6 @@ function Dashboard() {
9594
setOpen(!open);
9695
};
9796

98-
const SentryRoutes = Sentry.withSentryReactRouterV6Routing(Routes);
99-
10097
return (
10198
<Box sx={{display: 'flex'}}>
10299
<AppBar position="absolute" open={open}>
@@ -164,7 +161,7 @@ function Dashboard() {
164161
}}>
165162
<Toolbar />
166163
<Container maxWidth="xl" sx={{mt: 4, mb: 4}}>
167-
<SentryRoutes>
164+
<Routes>
168165
<Route path="/" element={<Home />} />
169166
<Route path="/users" element={<ListUsers />} />
170167
<Route path="/users/:id" element={<ReadUser />} />
@@ -184,7 +181,7 @@ function Dashboard() {
184181
<Route path="/tags" element={<ListTags />} />
185182
<Route path="/tags/:id" element={<ReadTag />} />
186183
<Route path="*" element={<NotFound />} />
187-
</SentryRoutes>
184+
</Routes>
188185
</Container>
189186
</Box>
190187
</Box>

src/index.tsx

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,6 @@ import CssBaseline from '@mui/material/CssBaseline';
77
import {AdapterDayjs} from '@mui/x-date-pickers/AdapterDayjs';
88
import {LocalizationProvider} from '@mui/x-date-pickers';
99
import * as Sentry from '@sentry/react';
10-
import {
11-
createBrowserRouter,
12-
createRoutesFromChildren,
13-
matchRoutes,
14-
useLocation,
15-
useNavigationType,
16-
} from 'react-router-dom';
1710

1811
import App from './App';
1912
import Error from './pages/Error';
@@ -69,17 +62,7 @@ if (['production', 'staging'].includes(process.env.NODE_ENV)) {
6962
Sentry.init({
7063
dsn: 'https://[email protected]/1234567',
7164
release: process.env.REACT_APP_SENTRY_RELEASE,
72-
integrations: [
73-
Sentry.reactRouterV6BrowserTracingIntegration({
74-
useEffect: React.useEffect,
75-
useLocation,
76-
useNavigationType,
77-
createRoutesFromChildren,
78-
matchRoutes,
79-
}),
80-
Sentry.replayIntegration(),
81-
],
82-
tracesSampleRate: 0.1,
65+
integrations: [Sentry.replayIntegration()],
8366
replaysSessionSampleRate: 0,
8467
replaysOnErrorSampleRate: 1.0,
8568
tunnel: '/api/bugs/sentry',

0 commit comments

Comments
 (0)