From 836fe0ee7f4a0f322e111519e476c04940590299 Mon Sep 17 00:00:00 2001 From: Charly Gomez Date: Tue, 5 Aug 2025 17:16:06 +0200 Subject: [PATCH] add missing api option for react component annotation --- .../nextjs/configuration/build/index.mdx | 26 +++++++++++++++---- 1 file changed, 21 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 68a8f35337172..eb8ee82ee563c 100644 --- a/docs/platforms/javascript/guides/nextjs/configuration/build/index.mdx +++ b/docs/platforms/javascript/guides/nextjs/configuration/build/index.mdx @@ -83,10 +83,10 @@ You can optionally re-throw the error to fail the build process. withSentryConfig(nextConfig, { // ... other options errorHandler: (error) => { - console.warn('Sentry build error occurred:', error); + console.warn("Sentry build error occurred:", error); // Optionally, you can still fail the build by re-throwing the error // throw error; - } + }, }); ``` @@ -241,9 +241,12 @@ This option can be set to: Learn more about tunneling in the troubleshooting section. - 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. + 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. @@ -261,6 +264,7 @@ Disables automatic injection of the route manifest into the client bundle. The route manifest is a build-time generated mapping of your Next.js App Router routes that enables Sentry to group transactions by parameterized route names (e.g., `/users/:id` instead of `/users/123`, `/users/456`, etc.). **Disable this option if:** + - You want to minimize client bundle size - You're experiencing build issues related to route scanning - You prefer raw URLs in transaction names @@ -268,6 +272,18 @@ The route manifest is a build-time generated mapping of your Next.js App Router + + +Enables React component name tracking. When enabled, it annotates React components with data attributes that allow Sentry to track which components users interacted with in features like Session Replay and breadcrumbs. + + + + + +A list of React component names to exclude from component annotation. + + +