-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Next.js docs for v8.0.0 #12044
Comments
Hey, sorry about that - we are jumping on this as we speak. in the meantime, to unblock you, can you create a file export async function register() {
if (process.env.NEXT_RUNTIME === 'nodejs') {
await import('./sentry.server.config');
}
if (process.env.NEXT_RUNTIME === 'edge') {
await import('./sentry.edge.config');
}
} as outlined here |
@dorin-flooz Thanks for pointing this out! I updated the docs so they are in line with v8. I guess the warning won't go away if you import the files like in the snippet @HazAT suggested. You have to delete the export async function register() {
if (process.env.NEXT_RUNTIME === 'nodejs') {
Sentry.init({
dsn: env.DSN
tracesSampleRate: 1.0,
});
}
if (process.env.NEXT_RUNTIME === 'edge') {
Sentry.init({
dsn: env.DSN
tracesSampleRate: 1.0,
});
}
} |
hey @HazAT / @s1gr1d, thanks for the quick reply! What about versioned docs - any plans to have that implemented? |
@dorin-flooz we discussed this internally and probably going to work on them |
the doc concerning "telemetry" is still missing, no? Thanks for the hints |
Hello @kbsali, do you mean this section: https://docs.sentry.io/platforms/javascript/guides/astro/sourcemaps/#disabeling-telemetry-data-collection |
@s1gr1d this is specific to Astro/vite apparently, we are running a nextjs project |
@kbsali I am not 100% sure if we are talking about the same thing. You are right, it is currently not directly documented when the Next.js docs talk about extending the configuration. However, Astro and Next.js both |
as far as I can tell
I see options for |
Oh yes, Next.js is using webpack, but the options are the same. The options specifically for the webpack plugin are defined here. And the docs show you how to configure your build options (the link I posted in my previous comment). I think, what you want to achieve is this in your export default withSentryConfig(nextConfig, {
// your other options...
telemetry: false
}); Is this helping you? If yes, we will add this to the docs. |
関連してそう getsentry/sentry-javascript#12044 あとedgeは必要無いので削除。ビルドwarnが出なければそのままでヨシ
Adding the following to next.config.js solved my issue. Don't see this mentioned on the installation page but it is on the migrate from 7 to 8 docs experimental: { |
Thanks @briantweed, this will be added to the "Manual Setup" docs as well: getsentry/sentry-docs#11140 |
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/nextjs
SDK Version
8.0.0
Framework Version
React latest
Link to Sentry event
No response
SDK Setup
No response
Steps to Reproduce
After upgrading to
@sentry/nextjs 8.0.0
, we get the following message in ouryarn next build
log:We tried following the documentation at https://docs.sentry.io/platforms/javascript/guides/nextjs to fix these issues, but it seems to be out of sync:
sentrySDKOptions
options.telemetry
telemetry
sentry.server.config.ts
- https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/integrations/#integration-usage-in-nextjsExpected Result
Actual Result
...
The text was updated successfully, but these errors were encountered: