Skip to content

Commit d637dbc

Browse files
authored
docs(astro/nuxt): Remove sourceMapsUploadOptions option nesting (#14905)
## DESCRIBE YOUR PR The build-time options are already changed in Astro and Nuxt, so this update is now reflected in the docs. related to this issue: getsentry/sentry-javascript#14212 ## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs to go live. - [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE --> - [ ] Other deadline: <!-- ENTER DATE HERE --> - [ ] None: Not urgent, can wait up to 1 week+ ## SLA - Teamwork makes the dream work, so please add a reviewer to your PRs. - Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it. Thanks in advance for your help! ## PRE-MERGE CHECKLIST *Make sure you've checked the following before merging your changes:* - [ ] Checked Vercel preview for correctness, including links - [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs)
1 parent 437ae82 commit d637dbc

File tree

6 files changed

+27
-38
lines changed

6 files changed

+27
-38
lines changed

docs/platforms/javascript/guides/astro/index.mdx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,9 @@ import sentry from "@sentry/astro";
8686
export default defineConfig({
8787
integrations: [
8888
sentry({
89-
sourceMapsUploadOptions: {
90-
project: "___PROJECT_SLUG___",
91-
org: "___ORG_SLUG___",
92-
authToken: process.env.SENTRY_AUTH_TOKEN,
93-
},
89+
project: "___PROJECT_SLUG___",
90+
org: "___ORG_SLUG___",
91+
authToken: process.env.SENTRY_AUTH_TOKEN,
9492
}),
9593
],
9694
});
@@ -208,7 +206,7 @@ To get readable stack traces in your production builds, set the `SENTRY_AUTH_TOK
208206
SENTRY_AUTH_TOKEN=___ORG_AUTH_TOKEN___
209207
```
210208

211-
This, in combination with your `sourceMapsUploadOptions` configuration, will <PlatformLink to="/sourcemaps">upload source maps</PlatformLink> to Sentry every time you make a production build.
209+
This, in combination with your `sentry` integration configuration, will <PlatformLink to="/sourcemaps">upload source maps</PlatformLink> to Sentry every time you make a production build.
212210

213211
## Verify
214212

platform-includes/configuration/filter-application-key/javascript.astro.mdx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22
export default defineConfig({
33
integrations: [
44
sentry({
5-
sourceMapsUploadOptions: {
6-
unstable_sentryVitePluginOptions: {
7-
applicationKey: "your-custom-application-key",
8-
},
5+
unstable_sentryVitePluginOptions: {
6+
applicationKey: "your-custom-application-key",
97
},
108
}),
119
],

platform-includes/getting-started-complete/javascript.nuxt.mdx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -222,20 +222,18 @@ export default defineNitroPlugin(sentryCloudflareNitroPlugin((nitroApp: NitroApp
222222

223223
## Step 3: Add Readable Stack Traces With Source Maps (Optional)
224224

225-
To upload source maps for clear error stack traces, add your Sentry auth token, organization, and project slugs in the `sentry.sourceMapsUploadOptions` inside your configuration file:
225+
To upload source maps for clear error stack traces, add your Sentry auth token, organization, and project slugs in the `sentry` options inside your configuration file:
226226

227227
<Alert>These `sentry` options only affect the **build time** of the SDK.</Alert>
228228

229229
```javascript {filename:nuxt.config.ts} {3-10}
230230
export default defineNuxtConfig({
231231
modules: ["@sentry/nuxt/module"],
232232
sentry: {
233-
sourceMapsUploadOptions: {
234-
org: "___ORG_SLUG___",
235-
project: "___PROJECT_SLUG___",
236-
// store your auth token in an environment variable
237-
authToken: process.env.SENTRY_AUTH_TOKEN,
238-
},
233+
org: "___ORG_SLUG___",
234+
project: "___PROJECT_SLUG___",
235+
// store your auth token in an environment variable
236+
authToken: process.env.SENTRY_AUTH_TOKEN,
239237
},
240238
});
241239
```

platform-includes/sourcemaps/legacy-uploading-methods/javascript.mdx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,18 +57,16 @@ sentry-cli sourcemaps upload --release=<release_name> /path/to/directory
5757

5858
## Working With Old Authentication Tokens
5959

60-
Source maps work best with [organization-scoped auth tokens](/account/auth-tokens/#organization-tokens). If you are using an old self-hosted Sentry version that doesn't yet support org-based tokens or you're using a different type of Sentry auth token, you'll need to additionally specify your `org` slug in your `sourceMapsUploadOptions`:
60+
Source maps work best with [organization-scoped auth tokens](/account/auth-tokens/#organization-tokens). If you are using an old self-hosted Sentry version that doesn't yet support org-based tokens or you're using a different type of Sentry auth token, you'll need to additionally specify your `org` slug in your `sentry` integration options:
6161

6262
```javascript {filename:astro.config.mjs}
6363
export default defineConfig({
6464
integrations: [
6565
sentry({
6666
// Other Sentry options
67-
sourceMapsUploadOptions: {
68-
project: "___PROJECT_SLUG___",
69-
org: "___ORG_SLUG___",
70-
authToken: process.env.SENTRY_AUTH_TOKEN,
71-
},
67+
project: "___PROJECT_SLUG___",
68+
org: "___ORG_SLUG___",
69+
authToken: process.env.SENTRY_AUTH_TOKEN,
7270
}),
7371
],
7472
});

platform-includes/sourcemaps/overview/javascript.astro.mdx

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,24 @@ To automatically upload source maps during production builds, add the `SENTRY_AU
1212
SENTRY_AUTH_TOKEN=___ORG_AUTH_TOKEN___
1313
```
1414

15-
Next, add your project slug to the `sourceMapsUploadOptions` in your Astro config:
15+
Next, add your project slug to the `sentry` integration options in your Astro config:
1616

1717
```javascript {filename:astro.config.mjs}
1818
export default defineConfig({
1919
integrations: [
2020
sentry({
21-
// Other Sentry options
22-
sourceMapsUploadOptions: {
23-
project: "___PROJECT_SLUG___",
24-
authToken: process.env.SENTRY_AUTH_TOKEN,
25-
},
21+
// Other Sentry build-time options
22+
org: "___ORG_SLUG___",
23+
project: "___PROJECT_SLUG___",
24+
authToken: process.env.SENTRY_AUTH_TOKEN,
2625
}),
2726
],
2827
});
2928
```
3029

3130
### Disable Source Maps Upload
3231

33-
You can disable automatic source maps upload in your Astro configuration with `enabled: false` under `sourceMapsUploadOptions`
32+
You can disable automatic source maps upload in your Astro configuration with `disable: true` under `sourcemaps` in the `sentry` integration options.
3433

3534
### Setting the Source Maps Assets Directory
3635

@@ -41,7 +40,7 @@ If these defaults don't work for you (for example, due to an advanced customized
4140
export default defineConfig({
4241
integrations: [
4342
sentry({
44-
sourceMapsUploadOptions: {
43+
sourcemaps: {
4544
assets: [".clientOut/**/*", ".serverOut/**/*"],
4645
},
4746
}),
@@ -61,4 +60,4 @@ Source maps work best with [organization-scoped auth tokens](/account/auth-token
6160
The Astro SDK uses the Sentry Vite plugin to upload source maps.
6261
This plugin collects telemetry data to help us improve the source map uploading experience.
6362
Read more about this in our [Vite plugin documentation](https://www.npmjs.com/package/@sentry/vite-plugin#telemetry).
64-
You can disable telemetry collection by setting `telemetry:false` under `sourceMapsUploadOptions`.
63+
You can disable telemetry collection by setting `telemetry: false` in the `sentry` integration options.

platform-includes/sourcemaps/primer/javascript.nuxt.mdx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,17 @@
22

33
## Configure Source Maps Upload
44

5-
To automatically upload source maps, you need to provide your Sentry auth token, your organization, and project slugs to the `sentry.sourceMapsUploadOptions` in your Nuxt config:
5+
To automatically upload source maps, you need to provide your Sentry auth token, your organization, and project slugs to the `sentry` options in your Nuxt config:
66

77
<OrgAuthTokenNote />
88

99
```javascript {filename:nuxt.config.ts} {3-9}
1010
export default defineNuxtConfig({
1111
modules: ["@sentry/nuxt/module"],
1212
sentry: {
13-
sourceMapsUploadOptions: {
14-
org: "___ORG_SLUG___",
15-
project: "___PROJECT_SLUG___",
16-
authToken: "___ORG_AUTH_TOKEN___",
17-
},
13+
org: "___ORG_SLUG___",
14+
project: "___PROJECT_SLUG___",
15+
authToken: "___ORG_AUTH_TOKEN___",
1816
},
1917
});
2018
```

0 commit comments

Comments
 (0)