-
-
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
Sentry.init no longer being called after sdk upgrade #8531
Comments
Hey @Blitz2145, thanks for writing in! Are you running the app on Vercel? |
Hey @AbhiPrasad we are not running on vercel. We are using Google cloud run, so a server environment not any edge runtime. We are using a custom server in next js, but that wasn't an issue before. |
We're taking a look trying to reproduce, sorry for the trouble in the mean time! |
@Blitz2145 can you show us your Also, the Sentry.init code you posted above is from your |
@Lms24 Thanks, if you can access support ticket #98294 I also attached more config files there. Yes, the init code was added to sentry.server.config.ts. ...
/** @type {Partial<import('@sentry/webpack-plugin').SentryCliPluginOptions>} */
const sentryWebpackPluginOptions = {
org: 'revere-cre',
project: 'revere-cre',
silent: process.env.NODE_ENV !== 'production',
// Only upload sourcemaps when a release name is specified.
dryRun: process.env.NEXT_PUBLIC_RELEASE == null,
authToken: process.env.SENTRY_AUTH_TOKEN,
};
/** @type {Partial<import('next').NextConfig>} */
const nextConfig = {
swcMinify: false,
reactStrictMode: true,
sentry: {
hideSourceMaps: true,
widenClientFileUpload: true,
disableServerWebpackPlugin: process.env.NEXT_PUBLIC_RELEASE == null,
disableClientWebpackPlugin: process.env.NEXT_PUBLIC_RELEASE == null,
autoInstrumentServerFunctions: false,
},
... |
@lforst any idea what this could be? |
No idea. I would try upgrading to the newest SDK version and if the issue persists provide a small reproduction example. |
The issue still persists as of v7.61.1 Will need to come up with a smaller repro, but might take a while. |
I looked at this again. Something about your SDK setup looks extremely fishy. Are you installing the Prisma integration in the frontend init ( |
Thanks for following up. I am not running the prisma integration in the frontend, the prisma integration is in We've also upgrade nextjs to v13.4.12 but that didn't change anything. Our setup is peculiar because we are not using auto instrumentation of api handlers on the server-side (it was too buggy and broke our app) and a custom server. |
Do you mind sharing in what way it was buggy? Thanks! I think I know what the issue is now. On the server side we're only importing |
Thanks for the fix, I'll try out the new release and see if it fixes our issues. We ran into trouble with the autoinstrumentation of API handlers causing connection close issues on handlers that used streaming responses. We also noticed a noticeable performance hit when using instrumentation in load tests, so we switched to opt-in explicit instrumentation. In general, its seems pretty hard to auto instrument reliably in the JS ecosystem. |
Thanks for providing insight into what didn't work for you. As a follow-up, are you deploying your app to Vercel or AWS Lambdas, or some other hosting provider that runs AWS Lambdas under the hood?
Word. |
We are deploying to google cloud run (aka long running containers), nothing lambda like yet. |
Interesting. We should investigate then what seems to be causing the overhead. |
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
7.58.0
Framework Version
Nextjs 13.0.6
Link to Sentry event
No response
SDK Setup
Steps to Reproduce
Expected Result
Actual Result
After upgrading the sdk following logs appear when errors are captured and we don't see the file with the sentry.init call being loaded at all. We noticed all server-side errors were no longer captured after the sdk upgrade. We think it started occuring after this change, #8368 Happy to help repro this, we reached out to sentry support but they told us to file a GH issue.
The text was updated successfully, but these errors were encountered: