Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/nextjs
SDK Version
9.29.0
Framework Version
Next 14.2.30
Link to Sentry event
Reproduction Example/SDK Setup
We have Sentry integrated into Next.js according to this documentation: https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/
We want Sentry to be included in CI builds, so that it is tested, but we want to filter out events emitted in CI to eliminate noise. Attempting to do this using beforeSend: () => null
, or ignoreErrors: [/.*/]
, or even enabled: false
does not stop events from appearing in Sentry.
The test case I'm using is a simple test error implemented by throwing in a Next.js app router page. If I enable debug logging, I can see that the beforeSend
is triggered and the logging claims the event is being dropped, but it shows up in Sentry nonetheless.
The relevant Next configuration is:
module.exports = withSentryConfig(nextConfig, {
authToken: process.env.SENTRY_PLATFORM_AUTH_TOKEN,
autoInstrumentAppDirectory: true,
autoInstrumentMiddleware: true,
autoInstrumentServerFunctions: true,
disableLogger: true,
org: "our-org-name",
project: process.env.SENTRY_PLATFORM_PROJECT,
tunnelRoute: "/monitoring",
widenClientFileUpload: true,
});
Steps to Reproduce
- configure Sentry as above
- generate app router page-level error
- observe that the error shows up in Sentry even though Sentry is disabled, or all events are filtered
Expected Result
Events should not show up in Sentry if the integration is disabled or if events are filtered.
Actual Result
Events appear in Sentry.
Metadata
Metadata
Assignees
Type
Projects
Status