Skip to content

Commit 5c6b8ed

Browse files
committed
integrate PR feedback
1 parent de180cd commit 5c6b8ed

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

docs/platforms/javascript/guides/nuxt/manual-setup.mdx

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,13 @@ export default defineNuxtConfig({
8888

8989
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:
9090

91-
```javascript {filename:sentry.client.config.ts} {"onboardingOptions": {"performance": "9-15", "session-replay": "7-8, 16-22"}}
91+
```javascript {filename:sentry.client.config.ts} {"onboardingOptions": {"performance": "10-16", "session-replay": "8-9, 17-23"}}
9292
import * as Sentry from "@sentry/nuxt";
9393

9494
Sentry.init({
9595
// If set up, you can use the Nuxt runtime config here
96-
// dsn: useRuntimeConfig().public.sentry.dsn, // modify, depending on your custom runtime config
96+
// dsn: useRuntimeConfig().public.sentry.dsn
97+
// modify depending on your custom runtime config
9798
dsn: "___PUBLIC_DSN___",
9899
// Replay may only be enabled for the client-side
99100
integrations: [Sentry.replayIntegration()],
@@ -135,7 +136,7 @@ This allows you to access the DSN using `useRuntimeConfig().public.sentry.dsn`.
135136

136137
Add a `sentry.server.config.ts` file to the root of your project and add the following initialization code to it:
137138

138-
```javascript {filename:sentry.server.config.ts}
139+
```javascript {filename:sentry.server.config.ts} {"onboardingOptions": {"performance": "5-11"}}
139140
import * as Sentry from "@sentry/nuxt";
140141

141142
Sentry.init({
@@ -153,7 +154,7 @@ Sentry.init({
153154
We recommend you store your Sentry [Data Source Name](/concepts/key-terms/dsn-explainer/) (DSN) in an environment variable.
154155

155156
<Expandable title="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:
157158

158159
Load environment variables from your `.env` file when starting the server:
159160

@@ -184,7 +185,7 @@ Check out the <PlatformLink to="/install/cli-import">`--import` CLI flag</Platfo
184185

185186
## Step 3: Add Readable Stack Traces With Source Maps (Optional)
186187

187-
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.
188189
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.
189190

190191
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,
253254

254255
<OnboardingOption optionId="performance" hideForThisOption>
255256
Open the page in a browser (for most Nuxt applications, this will be at
256-
localhost) and click the button to trigger a frontend error.
257+
localhost:3000) and click the button to trigger a frontend error.
257258
</OnboardingOption>
258259

259260
<PlatformContent includePath="getting-started-browser-sandbox-warning" />
@@ -299,11 +300,11 @@ Then update the test page by including a new button that executes a function to
299300
```
300301

301302
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`.
303304

304305
After running your project:
305306

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)
307308
2. Click the "Throw Client Error" button to trigger an error in the frontend
308309
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.
309310

@@ -317,7 +318,7 @@ Now, head over to your project on [Sentry.io](https://sentry.io) to view the col
317318

318319
## Next Steps
319320

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.
321322

322323
Now's a good time to customize your setup and look into more advanced topics. Our next recommended steps for you are:
323324

@@ -330,6 +331,7 @@ Now's a good time to customize your setup and look into more advanced topics. Ou
330331

331332
- If you encountered issues with setting up Sentry manually, [try our installation wizard](/platforms/javascript/guides/nuxt/)
332333
- Find various support topics in <PlatformLink to="/troubleshooting">troubleshooting</PlatformLink>
334+
- Review alternative <PlatformLink to="/install">installation methods</PlatformLink>
333335
- [Get support](https://sentry.zendesk.com/hc/en-us/)
334336

335337
</Expandable>

0 commit comments

Comments
 (0)