You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our Next.js SDK breaks (i.e. crashes a route) when ran on this runtime. We should provide users with a way to opt out certain routes of being initialized with the Sentry SDK so that users can use the Edge runtime without their apps crashing.
The text was updated successfully, but these errors were encountered:
Currently, in the nextjs SDK, we inject the user's `Sentry.init()` code (by way of their `sentry.server.config.js` file) into all serverside routes. This adds a new option to the `sentry` object in `next.config.js` which allows users to prevent specific routes from being instrumented in this way. In this option, excluded routes can be specified using either strings (which need to exactly match the route) or regexes.
Note: Heavily inspired by #6125. h/t to @lforst for his work there. Compared to that PR, this one allows non-API routes to be excluded and allows excluded pages to be specified as routes rather than filepaths. (Using routes a) obviates the need for users to add `pages/` to the beginning of every entry, b) abstracts away the differences between windows and POSIX paths, and c) futureproofs users' config values against underlying changes to project file organization.)
Docs for this feature are being added in getsentry/sentry-docs#5789.
Fixes#6119.
Fixes#5964.
Vercel allows users to use the Vercel Edge runtime for individual Next.js API routes.
Example:
Our Next.js SDK breaks (i.e. crashes a route) when ran on this runtime. We should provide users with a way to opt out certain routes of being initialized with the Sentry SDK so that users can use the Edge runtime without their apps crashing.
The text was updated successfully, but these errors were encountered: