Skip to content
Open
Changes from 3 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
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,19 @@ export const initializeSentryClient = (environment: string, dsn: string) =>
autoInject: false,
}),
],
beforeSend(event: Sentry.Event, hint: Sentry.EventHint) {
// Check if it is an exception, and if so, show the report dialog
if (event.exception && event.event_id) {
try {
Sentry.showReportDialog({ eventId: event.event_id });
} catch (err) {
// Prevent error reporting from causing its own errors
// Optionally log the error for debugging
// console.error('Failed to show Sentry report dialog:', err);
Copy link
Preview

Copilot AI Aug 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the project's Sentry logging guidelines, error logging should use Sentry's structured logger instead of console.error. Consider using logger.error() from Sentry with appropriate context if this line is uncommented.

Copilot generated this review using guidance from copilot-instructions.md.

}
}
return event;
},
replaysSessionSampleRate: environment === 'development' ? 1.0 : 0.1,
replaysOnErrorSampleRate: environment === 'development' ? 1.0 : 0.1,
});