From b02564c9d77544cd05588ff186cedce448a22dd2 Mon Sep 17 00:00:00 2001 From: betegon Date: Thu, 11 Jun 2026 10:25:30 +0200 Subject: [PATCH 1/7] docs(nuxt): add sentry init setup --- .../javascript/guides/nuxt/index.mdx | 104 +++++++++++++----- .../javascript/guides/nuxt/manual-setup.mdx | 3 +- 2 files changed, 75 insertions(+), 32 deletions(-) diff --git a/docs/platforms/javascript/guides/nuxt/index.mdx b/docs/platforms/javascript/guides/nuxt/index.mdx index 93ebccb991836d..4e8d5646a71ff6 100644 --- a/docs/platforms/javascript/guides/nuxt/index.mdx +++ b/docs/platforms/javascript/guides/nuxt/index.mdx @@ -14,35 +14,43 @@ categories: ## Install + + +The wizard is currently experimental. If you run into any issues, check out the [Manual Setup](/platforms/javascript/guides/nuxt/manual-setup/) guide. + + + -To install Sentry using the installation wizard, run the following command within your project: +Run the Sentry init command in your project directory to automatically configure Sentry in your Nuxt application. -The wizard then guides you through the setup process, asking you to enable additional (optional) Sentry features for your application beyond error monitoring. +The wizard guides you through setup and asks which optional Sentry features you want to enable beyond error monitoring. ```bash -npx @sentry/wizard@latest -i nuxt +npx sentry@latest init ``` - + + +The Sentry init wizard is AI-powered. It analyzes your project and generates a tailored integration, rather than applying a fixed template. Here's what it does: -This guide assumes that you enable all features and allow the wizard to create an example page or component. You can add or remove features at any time, but setting them up now will save you the effort of configuring them manually later. +- **Analyzes your project** — reads project files and manifests to understand your Nuxt app structure, including monorepos. It also respects AI instruction files such as `CLAUDE.md`, `AGENTS.md`, and `.cursorrules`. +- **Detects your framework** — identifies Nuxt and selects the `@sentry/nuxt` SDK. +- **Fetches official Sentry docs** — uses the current Sentry documentation as the source of truth when generating integration code. +- **Installs dependencies** — adds `@sentry/nuxt` using your project's package manager. +- **Creates and modifies files** — sets up client-side and server-side initialization, Nuxt module configuration, and other selected features based on your project structure. +- **Verifies the integration** — re-reads modified files after writing to confirm Sentry was integrated. - -- Creates `sentry.(client|server).config.ts` to initialize the SDK -- Creates or updates your `nuxt.config.ts` to add build options to add source maps upload and auto-instrumentation via Vite plugins -- Creates `.env.sentry-build-plugin` with an auth token to upload source maps (this file is automatically added to `.gitignore`) -- Adds an example page and route to your application to help verify your Sentry setup - - If it couldn't create a page, the wizard adds an example component instead +For full details on what each file does, see the [Manual Setup](/platforms/javascript/guides/nuxt/manual-setup/) guide. @@ -52,17 +60,21 @@ This guide assumes that you enable all features and allow the wizard to create a ## Verify Your Setup -If you haven't tested your Sentry configuration yet, let's do it now. You can confirm that Sentry is working properly and sending data to your Sentry project by using the example page created by the installation wizard. +The wizard will have prompted you to select which features to enable. Select the same options here to see the relevant verification steps: - -The wizard creates a `SentryErrorButton` component when it fails to add an example page to your project. This usually happens if you don't have a `app.vue` file or if that file does not contain the `NuxtPage` component. To verify your setup, follow these steps before continuing with the next section, "View Captured Data in Sentry": + -1. Add the `SentryErrorButton` component to a page and open it in your browser. For most Nuxt applications, this will be at localhost. -2. Click the "Throw Sample Error" button, which triggers an error and starts a performance trace on the client side. - -To test the server side as well, refer to the "Verify" section in the [Manual setup guide](/platforms/javascript/guides/nuxt/manual-setup/). + - +If you haven't tested your Sentry configuration yet, let's do it now. Add a test button to one of your pages to confirm that Sentry is working properly and sending data to your Sentry project. To test Sentry, you can run your Nuxt application in either production or development mode. We **recommend testing in production mode** as it most closely resembles your deployed application's environment. @@ -116,26 +128,58 @@ NODE_OPTIONS='--import ./.nuxt/dev/sentry.server.config.mjs' nuxt dev -After building and running your project: +After building and running your project, add the button to one of your pages and click it: + +```vue + +``` -1. Open the example page `/sentry-example-page` in your browser. For most Nuxt applications, this will be at localhost. -2. Click the "Throw sample error" button. This triggers two errors: - - a frontend error - - an error within the API route +Sentry captures the error for you. If the wizard added verification files to your project, you can use those instead of adding a temporary test button. -Sentry captures both of these errors for you. Additionally, the button click starts a performance trace to measure the time it takes for the API request to complete. +### Check Your Data in Sentry -### View Captured Data in Sentry +**Errors** — [Open Issues](https://sentry.io/orgredirect/organizations/:orgslug/issues/) -Now, head over to your project on [Sentry.io](https://sentry.io/) to view the collected data (it takes a couple of moments for the data to appear). +You should see "Sentry Test Error" with a full stack trace pointing to your source code. - + + +**Tracing** — [Open Traces](https://sentry.io/orgredirect/organizations/:orgslug/explore/traces/) + +You should see route and request traces. Learn more about [Nuxt tracing](/platforms/javascript/guides/nuxt/tracing/). + + + + + +**Session Replay** — [Open Replays](https://sentry.io/orgredirect/organizations/:orgslug/replays/) + +Watch a video-like recording of your session, including the moment the error occurred. Learn more about [Session Replay configuration](/platforms/javascript/guides/nuxt/session-replay/). + + + + + +**Logs** — [Open Logs](https://sentry.io/orgredirect/organizations/:orgslug/explore/logs/) + +See structured log entries from your application. Learn more about [Logs configuration](/platforms/javascript/guides/nuxt/logs/). - + ## Next Steps -At this point, you should have integrated Sentry into your Nuxt application and should already be sending error and performance data to your Sentry project. +At this point, you should have integrated Sentry into your Nuxt application and should already be sending data to your Sentry project. Now's a good time to customize your setup and look into more advanced topics. Our next recommended steps for you are: diff --git a/docs/platforms/javascript/guides/nuxt/manual-setup.mdx b/docs/platforms/javascript/guides/nuxt/manual-setup.mdx index 42767353eb1c61..0883849ee328bd 100644 --- a/docs/platforms/javascript/guides/nuxt/manual-setup.mdx +++ b/docs/platforms/javascript/guides/nuxt/manual-setup.mdx @@ -5,8 +5,7 @@ description: "Learn how to manually set up Sentry in your Nuxt app and capture y --- - For the fastest setup, we recommend using the [wizard - installer](/platforms/javascript/guides/nuxt). + For the fastest setup, we recommend using [`sentry init`](/platforms/javascript/guides/nuxt). From f333380f9c6781bbafd216db392832e236501d12 Mon Sep 17 00:00:00 2001 From: betegon Date: Thu, 11 Jun 2026 10:44:27 +0200 Subject: [PATCH 2/7] docs(nuxt): mention classic wizard alternative --- docs/platforms/javascript/guides/nuxt/index.mdx | 14 +++++++++++++- .../javascript/guides/nuxt/manual-setup.mdx | 9 ++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/docs/platforms/javascript/guides/nuxt/index.mdx b/docs/platforms/javascript/guides/nuxt/index.mdx index 4e8d5646a71ff6..5845bba1a598ae 100644 --- a/docs/platforms/javascript/guides/nuxt/index.mdx +++ b/docs/platforms/javascript/guides/nuxt/index.mdx @@ -16,7 +16,7 @@ categories: -The wizard is currently experimental. If you run into any issues, check out the [Manual Setup](/platforms/javascript/guides/nuxt/manual-setup/) guide. +The AI-powered `sentry init` flow is currently experimental. If you don't want to use it, use the existing framework-specific wizard below or check out the [Manual Setup](/platforms/javascript/guides/nuxt/manual-setup/) guide. @@ -39,6 +39,18 @@ npx sentry@latest init + + +If you don't want to use the experimental AI-powered flow, run the framework-specific installation wizard instead: + +```bash +npx @sentry/wizard@latest -i nuxt +``` + +To configure Sentry without a wizard, follow the [Manual Setup](/platforms/javascript/guides/nuxt/manual-setup/) guide. + + + The Sentry init wizard is AI-powered. It analyzes your project and generates a tailored integration, rather than applying a fixed template. Here's what it does: diff --git a/docs/platforms/javascript/guides/nuxt/manual-setup.mdx b/docs/platforms/javascript/guides/nuxt/manual-setup.mdx index 0883849ee328bd..5fe432b637f4f0 100644 --- a/docs/platforms/javascript/guides/nuxt/manual-setup.mdx +++ b/docs/platforms/javascript/guides/nuxt/manual-setup.mdx @@ -5,7 +5,14 @@ description: "Learn how to manually set up Sentry in your Nuxt app and capture y --- - For the fastest setup, we recommend using [`sentry init`](/platforms/javascript/guides/nuxt). + For automated setup, start with the experimental AI-powered [`sentry init`](/platforms/javascript/guides/nuxt) flow. + If you'd rather use the existing Nuxt installation wizard, run: + + ```bash + npx @sentry/wizard@latest -i nuxt + ``` + + Continue with this guide to set up Sentry manually. From 43f3818c7aa13849dfc4acc649222cd0032bf8ee Mon Sep 17 00:00:00 2001 From: betegon Date: Thu, 11 Jun 2026 10:48:18 +0200 Subject: [PATCH 3/7] docs(nuxt): inline classic wizard command --- docs/platforms/javascript/guides/nuxt/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/platforms/javascript/guides/nuxt/index.mdx b/docs/platforms/javascript/guides/nuxt/index.mdx index 5845bba1a598ae..a3f140c6bd4125 100644 --- a/docs/platforms/javascript/guides/nuxt/index.mdx +++ b/docs/platforms/javascript/guides/nuxt/index.mdx @@ -16,7 +16,7 @@ categories: -The AI-powered `sentry init` flow is currently experimental. If you don't want to use it, use the existing framework-specific wizard below or check out the [Manual Setup](/platforms/javascript/guides/nuxt/manual-setup/) guide. +The AI-powered `sentry init` flow is currently experimental. If you don't want to use it, run the existing framework-specific wizard with `npx @sentry/wizard@latest -i nuxt`, or check out the [Manual Setup](/platforms/javascript/guides/nuxt/manual-setup/) guide. From 6c46bb95d47aa94dd036dcfead31c97994dc87d4 Mon Sep 17 00:00:00 2001 From: betegon Date: Thu, 11 Jun 2026 11:04:49 +0200 Subject: [PATCH 4/7] docs(nuxt): avoid duplicating wizard command --- docs/platforms/javascript/guides/nuxt/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/platforms/javascript/guides/nuxt/index.mdx b/docs/platforms/javascript/guides/nuxt/index.mdx index a3f140c6bd4125..bf04acd5780d76 100644 --- a/docs/platforms/javascript/guides/nuxt/index.mdx +++ b/docs/platforms/javascript/guides/nuxt/index.mdx @@ -16,7 +16,7 @@ categories: -The AI-powered `sentry init` flow is currently experimental. If you don't want to use it, run the existing framework-specific wizard with `npx @sentry/wizard@latest -i nuxt`, or check out the [Manual Setup](/platforms/javascript/guides/nuxt/manual-setup/) guide. +The AI-powered `sentry init` flow is currently experimental. If you don't want to use it, use the existing framework-specific wizard option below, or check out the [Manual Setup](/platforms/javascript/guides/nuxt/manual-setup/) guide. From af1ae8b3ec0ef7f85c40c50dccdc61cc2c423c0d Mon Sep 17 00:00:00 2001 From: betegon Date: Thu, 11 Jun 2026 19:15:49 +0200 Subject: [PATCH 5/7] docs(nuxt): call sentry init a command --- docs/platforms/javascript/guides/nuxt/index.mdx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/platforms/javascript/guides/nuxt/index.mdx b/docs/platforms/javascript/guides/nuxt/index.mdx index bf04acd5780d76..a27927dc0f157d 100644 --- a/docs/platforms/javascript/guides/nuxt/index.mdx +++ b/docs/platforms/javascript/guides/nuxt/index.mdx @@ -16,7 +16,7 @@ categories: -The AI-powered `sentry init` flow is currently experimental. If you don't want to use it, use the existing framework-specific wizard option below, or check out the [Manual Setup](/platforms/javascript/guides/nuxt/manual-setup/) guide. +The AI-powered `sentry init` flow is currently experimental. To use the existing framework-specific setup instead, see the option below, or check out the [Manual Setup](/platforms/javascript/guides/nuxt/manual-setup/) guide. @@ -26,7 +26,7 @@ The AI-powered `sentry init` flow is currently experimental. If you don't want t Run the Sentry init command in your project directory to automatically configure Sentry in your Nuxt application. -The wizard guides you through setup and asks which optional Sentry features you want to enable beyond error monitoring. +The command guides you through setup and asks which optional Sentry features you want to enable beyond error monitoring. @@ -51,9 +51,9 @@ To configure Sentry without a wizard, follow the [Manual Setup](/platforms/javas - + -The Sentry init wizard is AI-powered. It analyzes your project and generates a tailored integration, rather than applying a fixed template. Here's what it does: +The `sentry init` command is AI-powered. It analyzes your project and generates a tailored integration, rather than applying a fixed template. Here's what it does: - **Analyzes your project** — reads project files and manifests to understand your Nuxt app structure, including monorepos. It also respects AI instruction files such as `CLAUDE.md`, `AGENTS.md`, and `.cursorrules`. - **Detects your framework** — identifies Nuxt and selects the `@sentry/nuxt` SDK. @@ -72,7 +72,7 @@ For full details on what each file does, see the [Manual Setup](/platforms/javas ## Verify Your Setup -The wizard will have prompted you to select which features to enable. Select the same options here to see the relevant verification steps: +The command will have prompted you to select which features to enable. Select the same options here to see the relevant verification steps: ``` -Sentry captures the error for you. If the wizard added verification files to your project, you can use those instead of adding a temporary test button. +Sentry captures the error for you. If the command you ran added verification files to your project, you can use those instead of adding a temporary test button. ### Check Your Data in Sentry From 7eb9b9ab4cd8381a43ed7d6512b0a9ccde9861b1 Mon Sep 17 00:00:00 2001 From: betegon Date: Thu, 11 Jun 2026 19:41:56 +0200 Subject: [PATCH 6/7] docs(nuxt): restore verification content --- .../javascript/guides/nuxt/index.mdx | 76 +++++-------------- 1 file changed, 20 insertions(+), 56 deletions(-) diff --git a/docs/platforms/javascript/guides/nuxt/index.mdx b/docs/platforms/javascript/guides/nuxt/index.mdx index a27927dc0f157d..8f33d353799384 100644 --- a/docs/platforms/javascript/guides/nuxt/index.mdx +++ b/docs/platforms/javascript/guides/nuxt/index.mdx @@ -72,21 +72,17 @@ For full details on what each file does, see the [Manual Setup](/platforms/javas ## Verify Your Setup -The command will have prompted you to select which features to enable. Select the same options here to see the relevant verification steps: - - +If you haven't tested your Sentry configuration yet, let's do it now. You can confirm that Sentry is working properly and sending data to your Sentry project by using the example page created by the installation wizard. - + +The wizard creates a `SentryErrorButton` component when it fails to add an example page to your project. This usually happens if you don't have a `app.vue` file or if that file does not contain the `NuxtPage` component. To verify your setup, follow these steps before continuing with the next section, "View Captured Data in Sentry": + +1. Add the `SentryErrorButton` component to a page and open it in your browser. For most Nuxt applications, this will be at localhost. +2. Click the "Throw Sample Error" button, which triggers an error and starts a performance trace on the client side. -If you haven't tested your Sentry configuration yet, let's do it now. Add a test button to one of your pages to confirm that Sentry is working properly and sending data to your Sentry project. +To test the server side as well, refer to the "Verify" section in the [Manual setup guide](/platforms/javascript/guides/nuxt/manual-setup/). + + To test Sentry, you can run your Nuxt application in either production or development mode. We **recommend testing in production mode** as it most closely resembles your deployed application's environment. @@ -140,58 +136,26 @@ NODE_OPTIONS='--import ./.nuxt/dev/sentry.server.config.mjs' nuxt dev -After building and running your project, add the button to one of your pages and click it: - -```vue - -``` - -Sentry captures the error for you. If the command you ran added verification files to your project, you can use those instead of adding a temporary test button. - -### Check Your Data in Sentry - -**Errors** — [Open Issues](https://sentry.io/orgredirect/organizations/:orgslug/issues/) +After building and running your project: -You should see "Sentry Test Error" with a full stack trace pointing to your source code. +1. Open the example page `/sentry-example-page` in your browser. For most Nuxt applications, this will be at localhost. +2. Click the "Throw sample error" button. This triggers two errors: + - a frontend error + - an error within the API route - +Sentry captures both of these errors for you. Additionally, the button click starts a performance trace to measure the time it takes for the API request to complete. -**Tracing** — [Open Traces](https://sentry.io/orgredirect/organizations/:orgslug/explore/traces/) +### View Captured Data in Sentry -You should see route and request traces. Learn more about [Nuxt tracing](/platforms/javascript/guides/nuxt/tracing/). +Now, head over to your project on [Sentry.io](https://sentry.io/) to view the collected data (it takes a couple of moments for the data to appear). - - - - -**Session Replay** — [Open Replays](https://sentry.io/orgredirect/organizations/:orgslug/replays/) - -Watch a video-like recording of your session, including the moment the error occurred. Learn more about [Session Replay configuration](/platforms/javascript/guides/nuxt/session-replay/). - - - - - -**Logs** — [Open Logs](https://sentry.io/orgredirect/organizations/:orgslug/explore/logs/) - -See structured log entries from your application. Learn more about [Logs configuration](/platforms/javascript/guides/nuxt/logs/). + - + ## Next Steps -At this point, you should have integrated Sentry into your Nuxt application and should already be sending data to your Sentry project. +At this point, you should have integrated Sentry into your Nuxt application and should already be sending error and performance data to your Sentry project. Now's a good time to customize your setup and look into more advanced topics. Our next recommended steps for you are: From 9261880965e48f674b600ec7a3097cc4fbc65dd2 Mon Sep 17 00:00:00 2001 From: betegon Date: Thu, 11 Jun 2026 19:45:14 +0200 Subject: [PATCH 7/7] docs(nuxt): inline init command in manual setup --- docs/platforms/javascript/guides/nuxt/manual-setup.mdx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/platforms/javascript/guides/nuxt/manual-setup.mdx b/docs/platforms/javascript/guides/nuxt/manual-setup.mdx index 5fe432b637f4f0..79846073e6ee4c 100644 --- a/docs/platforms/javascript/guides/nuxt/manual-setup.mdx +++ b/docs/platforms/javascript/guides/nuxt/manual-setup.mdx @@ -5,7 +5,12 @@ description: "Learn how to manually set up Sentry in your Nuxt app and capture y --- - For automated setup, start with the experimental AI-powered [`sentry init`](/platforms/javascript/guides/nuxt) flow. + For automated setup, run the experimental AI-powered `sentry init` command: + + ```bash + npx sentry@latest init + ``` + If you'd rather use the existing Nuxt installation wizard, run: ```bash