Skip to content

Commit

Permalink
Try disabling React Sentry tracing (#164)
Browse files Browse the repository at this point in the history
  • Loading branch information
somethingnew2-0 authored Oct 16, 2024
1 parent 41f3087 commit 875e0bd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 23 deletions.
7 changes: 2 additions & 5 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import * as React from 'react';
import {Link as RouterLink, Route, Routes} from 'react-router-dom';
import * as Sentry from '@sentry/react';

import {styled} from '@mui/material/styles';
import Link from '@mui/material/Link';
Expand Down Expand Up @@ -95,8 +94,6 @@ function Dashboard() {
setOpen(!open);
};

const SentryRoutes = Sentry.withSentryReactRouterV6Routing(Routes);

return (
<Box sx={{display: 'flex'}}>
<AppBar position="absolute" open={open}>
Expand Down Expand Up @@ -164,7 +161,7 @@ function Dashboard() {
}}>
<Toolbar />
<Container maxWidth="xl" sx={{mt: 4, mb: 4}}>
<SentryRoutes>
<Routes>
<Route path="/" element={<Home />} />
<Route path="/users" element={<ListUsers />} />
<Route path="/users/:id" element={<ReadUser />} />
Expand All @@ -184,7 +181,7 @@ function Dashboard() {
<Route path="/tags" element={<ListTags />} />
<Route path="/tags/:id" element={<ReadTag />} />
<Route path="*" element={<NotFound />} />
</SentryRoutes>
</Routes>
</Container>
</Box>
</Box>
Expand Down
19 changes: 1 addition & 18 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ import CssBaseline from '@mui/material/CssBaseline';
import {AdapterDayjs} from '@mui/x-date-pickers/AdapterDayjs';
import {LocalizationProvider} from '@mui/x-date-pickers';
import * as Sentry from '@sentry/react';
import {
createBrowserRouter,
createRoutesFromChildren,
matchRoutes,
useLocation,
useNavigationType,
} from 'react-router-dom';

import App from './App';
import Error from './pages/Error';
Expand Down Expand Up @@ -69,17 +62,7 @@ if (['production', 'staging'].includes(process.env.NODE_ENV)) {
Sentry.init({
dsn: 'https://[email protected]/1234567',
release: process.env.REACT_APP_SENTRY_RELEASE,
integrations: [
Sentry.reactRouterV6BrowserTracingIntegration({
useEffect: React.useEffect,
useLocation,
useNavigationType,
createRoutesFromChildren,
matchRoutes,
}),
Sentry.replayIntegration(),
],
tracesSampleRate: 0.1,
integrations: [Sentry.replayIntegration()],
replaysSessionSampleRate: 0,
replaysOnErrorSampleRate: 1.0,
tunnel: '/api/bugs/sentry',
Expand Down

0 comments on commit 875e0bd

Please sign in to comment.