Skip to content

Commit 8b822e1

Browse files
authored
Cleanup Astro upload page (#9149)
* Cleanup Astro upload page Astro's source map uploads includes a lot of snippet variations. I think this is distracting and we can stick what we promtoe and reduce the rest, and move the legacy token to the legacy uploading methods * Moving to legacy upload cuts down the main page * Update javascript.astro.mdx fix code text formatting
1 parent d910975 commit 8b822e1

File tree

2 files changed

+26
-42
lines changed

2 files changed

+26
-42
lines changed

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

+23
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,29 @@ Next, upload your artifacts (minified sources and source maps):
5353
sentry-cli sourcemaps upload --release=<release_name> /path/to/directory
5454
```
5555

56+
<PlatformSection supported={["javascript.astro"]}>
57+
58+
## Working With Old Authentication Tokens
59+
60+
Source maps work best with [organization-scoped auth tokens](/product/accounts/auth-tokens/#organization-auth-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`:
61+
62+
```javascript {filename:astro.config.mjs}
63+
export default defineConfig({
64+
integrations: [
65+
sentry({
66+
// Other Sentry options
67+
sourceMapsUploadOptions: {
68+
project: "___PROJECT_SLUG___",
69+
org: "___ORG_SLUG___",
70+
authToken: process.env.SENTRY_AUTH_TOKEN,
71+
},
72+
}),
73+
],
74+
});
75+
```
76+
</PlatformSection>
77+
78+
5679
## Uploading using Sentry Webpack Plugin Version 1.x
5780

5881
Assuming you have the `@sentry/webpack` package installed on version `1.x`, you can learn more on how to configure the plugin in the [Sentry webpack plugin v1 documentation](https://github.com/getsentry/sentry-webpack-plugin#readme).

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

+3-42
Original file line numberDiff line numberDiff line change
@@ -30,20 +30,7 @@ export default defineConfig({
3030

3131
### Disable Source Maps Upload
3232

33-
You can disable automatic source maps upload in your Astro config:
34-
35-
```javascript {filename:astro.config.mjs}
36-
export default defineConfig({
37-
integrations: [
38-
sentry({
39-
// Other Sentry options
40-
sourceMapsUploadOptions: {
41-
enabled: false,
42-
},
43-
}),
44-
],
45-
});
46-
```
33+
You can disable automatic source maps upload in your Astro configuration with `enabled: false` under `sourceMapsUploadOptions`
4734

4835
### Setting the Source Maps Assets Directory
4936

@@ -66,39 +53,13 @@ The specified patterns must follow the [glob syntax](https://www.npmjs.com/packa
6653

6754
### Working With Old Authentication Tokens
6855

69-
Source maps work best with [organization-scoped auth tokens](/product/accounts/auth-tokens/#organization-auth-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`:
56+
Source maps work best with [organization-scoped auth tokens](/product/accounts/auth-tokens/#organization-auth-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, refer to our [legacy upload methods](/platforms/javascript/guides/astro/sourcemaps/troubleshooting_js/#working-with-old-authentication-tokens) for more information.
7057

71-
```javascript {filename:astro.config.mjs}
72-
export default defineConfig({
73-
integrations: [
74-
sentry({
75-
// Other Sentry options
76-
sourceMapsUploadOptions: {
77-
project: "___PROJECT_SLUG___",
78-
org: "___ORG_SLUG___",
79-
authToken: process.env.SENTRY_AUTH_TOKEN,
80-
},
81-
}),
82-
],
83-
});
84-
```
8558

8659
### Disabeling Telemetry Data Collection
8760

8861
The Astro SDK uses the Sentry Vite plugin to upload source maps.
8962
This plugin collects telemetry data to help us improve the source map uploading experience.
9063
Read more about this in our [Vite plugin documentation](https://www.npmjs.com/package/@sentry/vite-plugin#telemetry).
91-
You can disable telemetry collection by setting `telemetry` to `false`:
64+
You can disable telemetry collection by setting `telemetry:false` under `sourceMapsUploadOptions`.
9265

93-
```javascript {filename:astro.config.mjs}
94-
export default defineConfig({
95-
integrations: [
96-
sentry({
97-
// Other Sentry options
98-
sourceMapsUploadOptions: {
99-
telemetry: false,
100-
},
101-
}),
102-
],
103-
});
104-
```

0 commit comments

Comments
 (0)