ref(nextjs): Remove sentry field in Next.js config as a means of configuration#10839
ref(nextjs): Remove sentry field in Next.js config as a means of configuration#10839
sentry field in Next.js config as a means of configuration#10839Conversation
sentry field in Next.js config as a means of configuration
MIGRATION.md
Outdated
| { | ||
| // Your Sentry Webpack Plugin Options... | ||
| }, | ||
| { | ||
| // Your Sentry SDK options... | ||
| }, |
There was a problem hiding this comment.
Is there a reason we keep these two objects separately? Have you thought about moving the webpack plugin options into a sub field of the sentry SDK options? The reasons I'm bringing this up:
- To me (as an avg SDK user), I probably don't understand what the Sentry webpack plugin does, vs. the SDK.
- In SvelteKit (granted the situation is different in the sense that we directly initialize a vite plugin), we don't have the separation but the Vite plugin options are contained in a
sourcemapsUploadOptionsfield within the plugin factory function options
i don't have a super strong opinion here, so feel free to disregard but I'm not sure if the separation makes sense. wdyt?
There was a problem hiding this comment.
Yes, eventually I would like to merge the two and I am probably gonna do that within v8 even. I just wanted to get rid of the sentry property as a first step. This will obviously require me to update the migration guide afterwards again, but I think it is gonna be fine.
The naming is gonna be a bit tricky because in the future (and even now) the webpack plugin can do more than just source maps: release management, commits, component-name injections, ... I am likely gonna expose multiple different options that all map to the plugin's options internally somehow.
There was a problem hiding this comment.
Makes sense, thx! Agree on the naming being tricky b/c of the multiple things.
|
Regardless of my comment btw, I think this is a change into the right direction. Much better than before! |
size-limit report 📦
|
| @@ -620,6 +579,47 @@ The SDK no longer filters out health check transactions by default. Instead, the | |||
| by the Sentry backend by default. You can disable dropping them in your Sentry project settings. If you still want to | |||
| drop specific transactions within the SDK you can either use the `ignoreTransactions` SDK option. | |||
|
|
|||
| ## Next.js SDK Changes | |||
|
|
|||
| ### Removal of the `sentry` property in your Next.js options | |||
There was a problem hiding this comment.
Was this deprecated in v7?
We should put this under this section: https://github.com/getsentry/sentry-javascript/blob/8e0d24369f96145ad78a4983aab31583fbf8f358/MIGRATION.md#nextjs-sdk
There was a problem hiding this comment.
Not strictly deprecated but we haven't been recommending this way of setting up the SDK for longer than a year.
I moved the section! Thanks!
As outlined in the migration guide changes withn this PR, we hope to decrease confusion by removing the
sentryfield on the Next.js config as a means to configuration.It is replaced by passing an explicit configuration argument to
withSentryConfig. This benefits from TS types.