feat: maximize Sentry free plan coverage for frontend and backend
- ErrorBoundary: use Sentry.ErrorBoundary with crash feedback dialog - RouteError: capture route errors in Sentry (skip chunk load errors) - User context: set Sentry user on login (frontend + backend) - Backend: enable profiling (profiles_sample_rate) - Frontend: add feedback integration, lower replay rate to conserve quota - Add temporary verification message for production validation Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -10,6 +10,11 @@ Sentry.init({
|
||||
maskAllText: false,
|
||||
blockAllMedia: false,
|
||||
}),
|
||||
// Crash feedback dialog — prompts users after unhandled errors
|
||||
Sentry.feedbackIntegration({
|
||||
autoInject: false,
|
||||
colorScheme: "dark",
|
||||
}),
|
||||
],
|
||||
|
||||
// Tracing — capture 100% in dev, 20% in production
|
||||
@@ -19,7 +24,13 @@ Sentry.init({
|
||||
/^https:\/\/api\.resolutionflow\.com/,
|
||||
],
|
||||
|
||||
// Session Replay — record 10% of sessions, 100% of error sessions
|
||||
replaysSessionSampleRate: 0.1,
|
||||
// Session Replay — conserve free-plan quota
|
||||
// 1% of normal sessions, 100% of error sessions
|
||||
replaysSessionSampleRate: import.meta.env.PROD ? 0.01 : 0.0,
|
||||
replaysOnErrorSampleRate: 1.0,
|
||||
});
|
||||
|
||||
// TODO: Remove after verifying Sentry is receiving frontend events
|
||||
if (import.meta.env.PROD) {
|
||||
Sentry.captureMessage("ResolutionFlow frontend Sentry verification", "info");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user