Closed YoonIN closed 1 week ago
Assigning to @getsentry/support for routing ⏲️
Routing to @getsentry/product-owners-issues for triage ⏲️
Hello and thanks for writing! First, thank you for the reproduction repo 🙌🏻
I tested the examples and for me, only captureException
was not showing up in Sentry when using next dev
. When creating a production build (next build
and next start
), everything was showing up in Sentry.
In general, our SDKs are optimized for production builds. Can you tell me which command you were using when starting the application? And does using the production build for you also leads to issues not showing up?
Sorry for the late reply.
As a result, it wasn't a problem with the src path like you said.
Our problem was that we had disabled the sideEffect.
Therefore, Sentry configuration files were treated as exceptions in the sideEffect rule.
package.json
...
"sideEffects": [
"./sentry.client.config.js",
"./sentry.edge.config.js",
"./sentry.server.config.js"
],
...
Thank you for your reply.
Were you able to run your example now?
And did you have to add the files to sideEffects
to make it work or is this the code example from where it did not work?
Your example worked fine. In our production service, the problem occurred because we disabled sideEffects, and we had to exclude sentry files from sideEffects.
This means you could fix it? :) I will close the issue then, but please reopen it if you still experience issues!
Environment
SaaS (https://sentry.io/)
Steps to Reproduce
I created two situations in the monorepo.
When both captureException and captureMessage are executed in middleware, they do not work in projects without src, but work in projects with src.
According to the issue in that link, it says that the issue has been resolved, but is the issue not resolved?
This link here is my sample.
Expected Result
The middleware sentry must operate in both projects.
Actual Result
Sentry operates in middleware only for projects with src.
Product Area
Unknown
Link
https://github.com/YoonIN/next-middleware-test
DSN
No response
Version
No response