-
Notifications
You must be signed in to change notification settings - Fork 8
feat: sentry integration (#1020) #1029
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🤦 fixed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds Sentry error tracking integration for client-side error monitoring in the brc-analytics application. The implementation initializes Sentry client-side instrumentation, configures environment-specific DSNs for dev and prod, and sets up a custom error page for Next.js Pages Router. Source map uploads are intentionally disabled as noted in the description.
Key Changes:
- Added
@sentry/nextjsv10.27.0 dependency for error tracking - Configured Sentry initialization in
instrumentation-client.tswith environment-based settings - Created custom error page (
pages/_error.tsx) to capture errors via Sentry - Added DSN configuration in dev/prod environment files
Reviewed changes
Copilot reviewed 7 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| instrumentation-client.ts | New file initializing Sentry client-side with DSN and environment configuration |
| pages/_error.tsx | New custom error page capturing errors to Sentry using Pages Router |
| next.config.mjs | Wrapped Next.js config with Sentry, disabled source maps |
| package.json | Added @sentry/nextjs dependency |
| site-config/brc-analytics/{dev,prod}/.env | Added NEXT_PUBLIC_SENTRY_DSN configuration |
| .env | Added example Sentry configuration with documentation |
| .gitignore | Added .env.sentry-build-plugin to ignore list |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
frano-m
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM @dannon thank you!
|
@dannon would you mind rebasing this PR so it can be merged thank you! |
Configure via NEXT_PUBLIC_SENTRY_DSN environment variable.
- Remove unneeded server/edge configs (static export) - Remove App Router files (using Pages Router) - Remove example pages - Use env var for DSN instead of hardcoding - Add typed _error.tsx for Pages Router error capture
Not needed for Pages Router projects.
Uses NEXT_PUBLIC_SITE_CONFIG to segment errors by environment.
Add DSN to site-config env files.
Description
Adds Sentry error tracking integration for client-side error monitoring.
Configuration:
Implementation:
Related Issue
Closes #1020