Move Sentry to NextJS Implementation#581
Merged
AlexJSully merged 2 commits intoMay 14, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR modernizes Sentry integration for the Next.js App Router by removing deprecated integrations usage and switching to Next.js instrumentation hooks, while also updating dependencies and strengthening the landing-page E2E error checks.
Changes:
- Added Next.js instrumentation entrypoints (
src/instrumentation.ts,src/instrumentation-client.ts) to hook Sentry into request errors and router transitions. - Removed deprecated
@sentry/integrationsusage and replaced it with@sentry/nextjs-provided console integration. - Updated dependencies and adjusted Cypress landing coverage to check for general console errors/uncaught errors rather than hydration-specific patterns.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/instrumentation.ts |
Adds server/edge instrumentation registration and exports onRequestError using Sentry’s Next.js hook. |
src/instrumentation-client.ts |
Adds client instrumentation export for capturing router transition starts. |
sentry.client.config.ts |
Removes deprecated integrations import and uses Sentry.captureConsoleIntegration() instead. |
package.json |
Updates Next/React/Sentry and other dependency versions; removes @sentry/integrations. |
cypress/e2e/landing.cy.ts |
Reworks landing E2E checks and adds a dedicated test to assert no console errors or uncaught errors on initial load. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Noticed the following error
TypeError: Cannot assign to read only property 'push' of object '[object Array]'which is caused by using the depreciated@sentry/integrations. Removed that package and modernized the Sentry implementation by using NextJS Instrumentation.Also updated all packages and updated landing error check to be general rather than just hydration based.