Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions frontend/SENTRY_SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ This application is integrated with Sentry for comprehensive error tracking and
- **Uncaught Exceptions**: JavaScript errors are automatically captured
- **Network Errors**: Failed API requests are tracked
- **Performance Issues**: Slow transactions and rendering issues
- **Session Replay**: User interactions (clicks, scrolls, navigation) are captured for debugging

### Session Replay Privacy Defaults
- **PII Masking**: All text content in replay is masked (`maskAllText: true`)
- **Media Blocking**: Images and video are blocked in replay (`blockAllMedia: true`)
- **Sampling**:
- `replaysSessionSampleRate = 0.1` (10% of all sessions)
- `replaysOnErrorSampleRate = 1.0` (100% of sessions with errors)

### Manual Error Reporting
Use the `useErrorReporting` hook for custom error tracking:
Expand Down
11 changes: 10 additions & 1 deletion frontend/sentry.client.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,18 @@ import * as Sentry from "@sentry/nextjs";

Sentry.init({
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
integrations: [
Sentry.replayIntegration({
// Privacy-by-default: mask text and block media in recordings.
maskAllText: true,
blockAllMedia: true,
}),
],
// Performance monitoring
tracesSampleRate: 1.0,
// Session replay
// Session replay sampling
// - 10% of all sessions are recorded.
// - 100% of sessions with errors are recorded.
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,
// Environment
Expand Down
Loading