-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
Package: nextjsIssues related to the Sentry Nextjs SDKIssues related to the Sentry Nextjs SDK
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
7.72.0
Framework Version
Next 13.4.19
Link to Sentry event
No response
SDK Setup
For this issue, I think what we're passing into withSentryConfig is more relevant:
const sentryConfig = {
autoInstrumentMiddleware: false,
hideSourceMaps: true
};
const nextConfigWithSentry = withSentryConfig(
nextConfig,
sentryWebpackPluginOptions,
sentryConfig,
);But just in case, here's what the sentry.edge.config.ts file looks like:
Sentry.init({
enabled: process.env.NODE_ENV === 'production',
dsn: SENTRY_DSN,
environment: process.env.SENTRY_ENVIRONMENT,
tracesSampleRate: 1,
});Steps to Reproduce
Pre-req: A Next.js application that has middleware
- As per the docs, add the following to opt out of auto instrumentation of middleware:
const nextConfig = {
sentry: {
autoInstrumentMiddleware: false,
},
};- Start the application and perform the necessary steps for the middleware to be triggered
- Check Sentry to see if the request that was handled by the middleware shows up in the performance and/or discover sections.
Expected Result
Since auto instrumentation is disabled, I don't expect to see any middleware transactions in Sentry.
Actual Result
Metadata
Metadata
Assignees
Labels
Package: nextjsIssues related to the Sentry Nextjs SDKIssues related to the Sentry Nextjs SDK
Projects
Status
No status
