Repository navigation
Sentry.init no longer being called after sdk upgrade #8531
Description
Activity
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.
Reacted by Abhijeet PrasadWe're taking a look trying to reproduce, sorry for the trouble in the mean time!
@Blitz2145 can you show us your
next.config.js? I'm curious how you configured yourwithSentryConfigoptions.Also, the Sentry.init code you posted above is from your
sentry.server.config.ts, right?@Blitz2145 can you show us your
next.config.js? I'm curious how you configured yourwithSentryConfigoptions.Also, the Sentry.init code you posted above is from your
sentry.server.config.ts, right?@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, }, ...
- Reacted by Blitz2145
8 remaining items
I looked at this again. Something about your SDK setup looks extremely fishy.
Are you installing the Prisma integration in the frontend init (
sentry.client.config.ts)? Cause that will not work for obvious reasons: browsers generally don't run prisma.- moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀
on Aug 9, 2023 I looked at this again. Something about your SDK setup looks extremely fishy.
Are you installing the Prisma integration in the frontend init (
sentry.client.config.ts)? Cause that will not work for obvious reasons: browsers generally don't run prisma.Thanks for following up. I am not running the prisma integration in the frontend, the prisma integration is in
sentry.server.config.ts.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.
it was too buggy and broke our app
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
sentry.server.config.tswhenautoInstrumentServerFunctionsisn't set to false. This is obviously not what we want.- moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀
on Aug 10, 2023 it was too buggy and broke our app
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
sentry.server.config.tswhenautoInstrumentServerFunctionsisn't set to false. This is obviously not what we want.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?
In general, its seems pretty hard to auto instrument reliably in the JS ecosystem.
Word.
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?
In general, its seems pretty hard to auto instrument reliably in the JS ecosystem.
Word.
We are deploying to google cloud run (aka long running containers), nothing lambda like yet.
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?
In general, its seems pretty hard to auto instrument reliably in the JS ecosystem.
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.
Metadata
Metadata
Assignees
Labels
Projects
- StatusShow more project fieldsNo status
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.