You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a `sentry.client.config.ts` file to the root of your project (this is probably the same level as the `package.json`). In this file, import and initialize Sentry, specifying any SDK options for the client:
We recommend you store your Sentry [Data Source Name](/concepts/key-terms/dsn-explainer/) (DSN) in an environment variable.
154
155
155
156
<Expandabletitle="How to access environment variables in sentry.server.config.ts">
156
-
Since Sentry on the server side needs to be loaded before `useRuntimeConfig()` is fully available, environment variables are not directly accessible via `process.env`. To make sure your environment variables are available, use one of these methods:
157
+
Since Sentry on the server side needs to be loaded before `useRuntimeConfig()` is fully available, environment variables are only accessible via `process.env`. To make sure your environment variables are available, use one of these methods:
157
158
158
159
Load environment variables from your `.env` file when starting the server:
159
160
@@ -184,7 +185,7 @@ Check out the <PlatformLink to="/install/cli-import">`--import` CLI flag</Platfo
The Sentry Nuxt Module uses the [Sentry Vite Plugin](https://www.npmjs.com/package/@sentry/vite-plugin) to upload source maps for both server and client builds.
188
+
The Sentry Nuxt Module uses the [Sentry Vite Plugin](https://www.npmjs.com/package/@sentry/vite-plugin)and the [Sentry Rollup Plugin](https://www.npmjs.com/package/@sentry/rollup-plugin)to upload source maps for both server and client builds.
188
189
This means that when you run a production build (`nuxt build`), source maps will be generated and uploaded to Sentry, so that you get readable stack traces in your Sentry issues.
189
190
190
191
To upload source maps, specify your Sentry auth token as well as your org and project slugs. Set them in the `sourceMapsUploadOptions` option
@@ -253,7 +254,7 @@ To verify that Sentry captures errors and creates issues in your Sentry project,
@@ -299,11 +300,11 @@ Then update the test page by including a new button that executes a function to
299
300
```
300
301
301
302
Once you have your test code in place, you need to build your project since Sentry's server-side monitoring doesn't work in development mode.
302
-
Then start your app and make sure to load Sentry on the server side by explicitly adding it via `--import`.
303
+
Then start your app and make sure to load Sentry on the server side by explicitly adding the Sentry server config in the build output via `--import`.
303
304
304
305
After running your project:
305
306
306
-
1. Open your test page in a browser (for most Nuxt applications, this will be at localhost)
307
+
1. Open your test page in a browser (for most Nuxt applications, this will be at localhost:3000)
307
308
2. Click the "Throw Client Error" button to trigger an error in the frontend
308
309
3. Click the "Throw Server Error" button to trigger an error within the API route and start a performance trace to measure the time it takes for the API request to complete.
309
310
@@ -317,7 +318,7 @@ Now, head over to your project on [Sentry.io](https://sentry.io) to view the col
317
318
318
319
## Next Steps
319
320
320
-
At this point, you should have integrated Sentry into your Next.js application and should already be sending data to your Sentry project.
321
+
At this point, you should have integrated Sentry into your Nuxt application and should already be sending data to your Sentry project.
321
322
322
323
Now's a good time to customize your setup and look into more advanced topics. Our next recommended steps for you are:
323
324
@@ -330,6 +331,7 @@ Now's a good time to customize your setup and look into more advanced topics. Ou
330
331
331
332
- If you encountered issues with setting up Sentry manually, [try our installation wizard](/platforms/javascript/guides/nuxt/)
332
333
- Find various support topics in <PlatformLinkto="/troubleshooting">troubleshooting</PlatformLink>
334
+
- Review alternative <PlatformLinkto="/install">installation methods</PlatformLink>
0 commit comments