From a065eb07b9f8b9d640ffd545e65eabcad883eb8d Mon Sep 17 00:00:00 2001 From: Charly Gomez Date: Wed, 18 Jun 2025 12:35:55 +0200 Subject: [PATCH 1/3] update next docs on tunneling option --- .../guides/nextjs/configuration/build/index.mdx | 10 ++++++++-- .../javascript/guides/nextjs/manual-setup.mdx | 8 +++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/docs/platforms/javascript/guides/nextjs/configuration/build/index.mdx b/docs/platforms/javascript/guides/nextjs/configuration/build/index.mdx index d0826b91ef6703..569168132f6216 100644 --- a/docs/platforms/javascript/guides/nextjs/configuration/build/index.mdx +++ b/docs/platforms/javascript/guides/nextjs/configuration/build/index.mdx @@ -208,13 +208,17 @@ excludeServerRoutes: [ - + This feature requires **Next.js version 11+** and doesn't currently work with self-hosted Sentry instances. Tunnel Sentry requests through this route on your Next.js server to prevent ad-blockers from blocking Sentry events from being sent. -This route should be a path, like `/error-monitoring`, as it adds an API endpoint within your application. + +This option can be set to: + +- `true` for auto-generated routes, which are unpredictable and change with each deployment. +- A custom static string path like `/error-monitoring`. Learn more about tunneling in the troubleshooting section. @@ -222,6 +226,8 @@ Learn more about tunneling in the Date: Tue, 8 Jul 2025 09:04:38 +0200 Subject: [PATCH 2/3] update middleware note --- .../guides/nextjs/configuration/build/index.mdx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/docs/platforms/javascript/guides/nextjs/configuration/build/index.mdx b/docs/platforms/javascript/guides/nextjs/configuration/build/index.mdx index 569168132f6216..7ec0aff39f6bbb 100644 --- a/docs/platforms/javascript/guides/nextjs/configuration/build/index.mdx +++ b/docs/platforms/javascript/guides/nextjs/configuration/build/index.mdx @@ -222,12 +222,10 @@ This option can be set to: Learn more about tunneling in the troubleshooting section. - - Client-side event recording will fail if your Next.js middleware intercepts - the configured route. To prevent this, exclude the tunnel route by adding a - negative matcher to your middleware like `(?!monitoring-tunnel)`. + + If you're using Turbopack, client-side event recording will fail if your Next.js middleware intercepts the configured tunnel route. To fix this, set the route to a fixed string (like `/error-monitoring`) and add a negative matcher like `(?!error-monitoring)` in your middleware to exclude the tunnel route. - In the case of auto-generated routes, the route is unpredictable and changes with each deployment. Instead of using a negative matcher, you can add an allowlist of matchers for the routes you want your middleware to handle or fallback to a custom static path. + If you're not using Turbopack, Sentry will automatically skip the tunnel route in your middleware. From 658364c7ae27a381f118ee7c98cbb2f13e5bacee Mon Sep 17 00:00:00 2001 From: Charly Gomez Date: Tue, 8 Jul 2025 09:52:18 +0200 Subject: [PATCH 3/3] beepboop --- .../javascript/guides/nextjs/manual-setup.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/platforms/javascript/guides/nextjs/manual-setup.mdx b/docs/platforms/javascript/guides/nextjs/manual-setup.mdx index 551cd858e27193..8af7ad484a9633 100644 --- a/docs/platforms/javascript/guides/nextjs/manual-setup.mdx +++ b/docs/platforms/javascript/guides/nextjs/manual-setup.mdx @@ -471,11 +471,11 @@ module.exports = withSentryConfig(nextConfig, { }); ``` - - Client-side event recording will fail if your Next.js middleware intercepts - the configured route. To prevent this, exclude the tunnel route by adding a - negative matcher to your middleware like `(?!monitoring-tunnel)`. - + + If you're using Turbopack, client-side event recording will fail if your Next.js middleware intercepts the configured tunnel route. To fix this, set the route to a fixed string (like `/error-monitoring`) and add a negative matcher like `(?!error-monitoring)` in your middleware to exclude the tunnel route. + + If you're not using Turbopack, Sentry will automatically skip the tunnel route in your middleware. + ## Step 6: Instrument Vercel Cron Jobs (Optional)