Skip to content

Commit

Permalink
fix: update sentry config
Browse files Browse the repository at this point in the history
  • Loading branch information
paulschreiber committed Feb 28, 2024
1 parent afb61f9 commit 6b3ea25
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,25 @@ Sentry.init({
dsn: SENTRY_DSN,
environment: TERRASO_ENV,
integrations: [
new Sentry.BrowserTracing({
// Set 'tracePropagationTargets' to control for which URLs distributed tracing should be enabled
tracePropagationTargets: ['localhost', /^https:\/\/yourserver\.io\/api/],
// See docs for support of different versions of variation of react router
// https://docs.sentry.io/platforms/javascript/guides/react/configuration/integrations/react-router/
Sentry.reactRouterV6BrowserTracingIntegration({
useEffect: React.useEffect,
}),
new Sentry.Replay(),
Sentry.replayIntegration(),
],
// Performance Monitoring
tracesSampleRate: 1.0, // Capture 100% of the transactions
// Session Replay
replaysSessionSampleRate: 0.1, // This sets the sample rate at 10%. You may want to change it to 100% while in development and then sample at a lower rate in production.
replaysOnErrorSampleRate: 1.0, // If you're not already sampling the entire session, change the sample rate to 100% when sampling sessions where errors occur.

// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for performance monitoring.
tracesSampleRate: 1.0,

// Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled
tracePropagationTargets: ['127.0.0.1', /^https:\/\/terraso\.org/],

// Capture Replay for 10% of all sessions,
// plus for 100% of sessions with an error
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,
});

createRoot(document.getElementById('root')).render(
Expand Down

0 comments on commit 6b3ea25

Please sign in to comment.