-
Notifications
You must be signed in to change notification settings - Fork 0
Update sentry #28
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
base: main
Are you sure you want to change the base?
Update sentry #28
Conversation
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 updates the Sentry integration to version 10, refactoring the initialization approach and adding new monitoring capabilities. The changes move from conditional runtime initialization to a preload pattern using Node's --import flag, and add comprehensive example routes for testing Sentry functionality.
Key Changes:
- Upgraded Sentry packages from v9 to v10 and restructured initialization to use instrument files
- Removed conditional Sentry initialization logic and adopted a preload approach with
--importflag - Added example routes (
/sentry/example-pageand/sentry/api/sentry-example-api) for testing Sentry integration
Reviewed changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| vite.config.ts | Simplified Sentry configuration, removing auth/org/project settings and sourcemap upload options |
| server/utils/monitoring.ts | Deleted file - initialization moved to instrument.server.ts |
| server/index.ts | Removed conditional Sentry initialization and SENTRY_ENABLED logic |
| instrument.server.ts | New file containing server-side Sentry initialization with spotlight support |
| app/entry.server.tsx | Integrated Sentry request/error handlers and added CSP for Spotlight |
| app/entry.client.tsx | Moved client Sentry initialization inline with spotlight support |
| app/utils/monitoring.client.tsx | Deleted file - initialization moved to entry.client.tsx |
| app/routes/sentry/example-page.tsx | New example page for testing Sentry error capture |
| app/routes/sentry/api.sentry-example-api.ts | New API route for testing backend error capture |
| package.json | Updated dev/start scripts to use --import flag and upgraded Sentry packages |
| playwright.config.ts | Added SENTRY_ENVIRONMENT test configuration |
| other/Dockerfile | Added SENTRY_RELEASE environment variable from build arg |
| .github/workflows/deploy.yml | Added Sentry environment configuration and release creation step |
| docs/monitoring.md | Updated documentation to reflect new deployment workflow |
| .env.example | Added SENTRY_ENVIRONMENT configuration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| }, | ||
| })) | ||
|
|
||
| const sentryConfig: SentryReactRouterBuildOptions = { |
Copilot
AI
Dec 29, 2025
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.
The reactComponentAnnotation configuration is introduced without explanation. Consider adding a comment explaining what this feature does and why it's enabled.
| const sentryConfig: SentryReactRouterBuildOptions = { | |
| const sentryConfig: SentryReactRouterBuildOptions = { | |
| // Enable Sentry's React component annotations so component names and render trees | |
| // are visible in performance traces and error reports, improving production debugging. |
|
|
||
| - name: Create Sentry release | ||
| env: | ||
| SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} |
Copilot
AI
Dec 29, 2025
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.
These commented-out values are required for the Sentry release action to work. The documentation should clarify that users must uncomment and set these values, or the step will fail silently.
| SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
| SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
| # NOTE: Uncomment and set the following values, or this Sentry release step will not work. |
| /\/site\.webmanifest/, | ||
| ], | ||
| integrations: [ | ||
| Sentry.prismaIntegration(), |
Copilot
AI
Dec 29, 2025
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.
The prismaIntegration() is called without the prismaInstrumentation parameter that was present in the old configuration (server/utils/monitoring.ts). Verify this is intentional and that Prisma instrumentation still works correctly without explicitly passing PrismaInstrumentation.
Test Plan
Checklist
Screenshots