Skip to content

Commit

Permalink
[C-5391] Add session replay to sentry (#10434)
Browse files Browse the repository at this point in the history
  • Loading branch information
DejayJD authored Nov 13, 2024
1 parent e08c4a6 commit c3faf1f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/web/src/services/sentry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ export const initializeSentry = () => {
// Catch failed network requests
Sentry.httpClientIntegration(),
// Capture console.errors in sentry
Sentry.captureConsoleIntegration({ levels: ['error'] })
Sentry.captureConsoleIntegration({ levels: ['error'] }),
// Capture a session recording
Sentry.replayIntegration({})
],

normalizeDepth: 5,
Expand All @@ -54,6 +56,10 @@ export const initializeSentry = () => {
}
}
return breadCrumb
}
},
// This is the sample rate for healthy sessions without errors - set to 0 since we only care about errors
replaysSessionSampleRate: 0,
// This is a sample rate specific to when errors occur. We want to see 100% of them
replaysOnErrorSampleRate: 1.0
})
}

0 comments on commit c3faf1f

Please sign in to comment.