Skip to content

Commit 935b95a

Browse files
s1gr1dcoolguyzone
andauthored
docs(svelteKit): Update build-time options for source maps (#15283)
## DESCRIBE YOUR PR Updating docs based on this PR: getsentry/sentry-javascript#17413 Related to this project: 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) --------- Co-authored-by: Alex Krawiec <[email protected]>
1 parent 394df25 commit 935b95a

File tree

7 files changed

+44
-58
lines changed

7 files changed

+44
-58
lines changed

docs/platforms/javascript/guides/sveltekit/configuration/build/index.mdx

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,38 +22,42 @@ The Sentry SvelteKit SDK supports automatic code instrumentation and source map
2222

2323
<TableOfContents ignoreIds={["available-options"]} />
2424

25-
## Source Maps Options
25+
## General Options
26+
27+
These options can be set on the root level of the `sentrySvelteKit` configuration object. Most of them are relevant for the source map upload process.
2628

27-
<SdkOption name="sourceMapsUploadOptions.org" type="string" envVar="SENTRY_ORG">
29+
<SdkOption name="org" type="string" envVar="SENTRY_ORG">
2830

29-
The slug of the Sentry organization associated with the app.
31+
The slug of the Sentry organization associated with the app.
3032

3133
</SdkOption>
3234

33-
<SdkOption name="sourceMapsUploadOptions.project" type="string" envVar="SENTRY_PROJECT">
35+
<SdkOption name="project" type="string" envVar="SENTRY_PROJECT">
3436

35-
The slug of the Sentry project associated with the app.
37+
The slug of the Sentry project associated with the app.
3638

3739
</SdkOption>
3840

39-
<SdkOption name="sourceMapsUploadOptions.authToken" type="string" envVar="SENTRY_AUTH_TOKEN">
41+
<SdkOption name="authToken" type="string" envVar="SENTRY_AUTH_TOKEN">
4042

41-
The authentication token to use for all communication with Sentry. Can be obtained from https://sentry.io/orgredirect/organizations/:orgslug/settings/auth-tokens/.
43+
The authentication token to use for all communication with Sentry. Can be obtained from https://sentry.io/orgredirect/organizations/:orgslug/settings/auth-tokens/.
4244

4345
</SdkOption>
4446

45-
<SdkOption name="sourceMapsUploadOptions.url" type="string" envVar="SENTRY_URL" defaultValue="https://sentry.io/">
47+
<SdkOption name="sentryUrl" type="string" envVar="SENTRY_URL" defaultValue="https://sentry.io/">
4648

47-
The base URL of your Sentry instance. Only relevant if you're using a self-hosted or Sentry instance other than sentry.io.
49+
The base URL of your Sentry instance. Only relevant if you're using a self-hosted or Sentry instance other than sentry.io.
4850

4951
</SdkOption>
5052

5153
<SdkOption name="adapter" type="string">
5254

53-
By default, `sentrySvelteKit` will try to detect your SvelteKit adapter to configure the source maps upload correctly. If you're not using one of the [supported adapters](/platforms/javascript/guides/sveltekit/) or the wrong one is detected, you can override the adapter detection using the `adapter` option.
55+
By default, `sentrySvelteKit` will try to detect your SvelteKit adapter to configure the source maps upload correctly. If you're not using one of the [supported adapters](/platforms/javascript/guides/sveltekit/) or the wrong one is detected, you can override the adapter detection using the `adapter` option.
5456

5557
</SdkOption>
5658

59+
## Source Maps Options
60+
5761
<SdkOption name="autoUploadSourceMaps" type="boolean">
5862

5963
Disable automatic source maps upload by setting `autoUploadSourceMaps` to `false`.

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@ export default defineConfig(
55
/* Your SolidStart config */
66
},
77
{
8-
sourceMapsUploadOptions: {
9-
unstable_sentryVitePluginOptions: {
10-
applicationKey: "your-custom-application-key",
11-
},
8+
unstable_sentryVitePluginOptions: {
9+
applicationKey: "your-custom-application-key",
1210
},
1311
},
1412
),

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22
export default defineConfig({
33
plugins: [
44
sentrySvelteKit({
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.sveltekit.mdx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -320,12 +320,10 @@ import { sentrySvelteKit } from "@sentry/sveltekit";
320320
export default {
321321
plugins: [
322322
sentrySvelteKit({
323-
sourceMapsUploadOptions: {
324-
org: "___ORG_SLUG___",
325-
project: "___PROJECT_SLUG___",
326-
// store your auth token in an environment variable
327-
authToken: process.env.SENTRY_AUTH_TOKEN,
328-
},
323+
org: "___ORG_SLUG___",
324+
project: "___PROJECT_SLUG___",
325+
// store your auth token in an environment variable
326+
authToken: process.env.SENTRY_AUTH_TOKEN,
329327
}),
330328
sveltekit(),
331329
],

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

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,9 @@ export default defineConfig(
3131
/* Your SolidStart config */
3232
},
3333
{
34-
sourceMapsUploadOptions: {
35-
org: "___ORG_SLUG___",
36-
project: "___PROJECT_SLUG___",
37-
authToken: process.env.SENTRY_AUTH_TOKEN,
38-
},
34+
org: "___ORG_SLUG___",
35+
project: "___PROJECT_SLUG___",
36+
authToken: process.env.SENTRY_AUTH_TOKEN,
3937
},
4038
),
4139
);
@@ -52,15 +50,13 @@ export default defineConfig(
5250
/* Your SolidStart config */
5351
},
5452
{
55-
sourceMapsUploadOptions: {
56-
org: "___ORG_SLUG___",
57-
project: "___PROJECT_SLUG___",
58-
authToken: process.env.SENTRY_AUTH_TOKEN,
59-
sourcemaps: {
60-
assets: ["./dist/**/*"],
61-
ignore: ["**/node_modules/**"],
62-
filesToDeleteAfterUpload: ["./dist/**/*.map"],
63-
},
53+
org: "___ORG_SLUG___",
54+
project: "___PROJECT_SLUG___",
55+
authToken: process.env.SENTRY_AUTH_TOKEN,
56+
sourcemaps: {
57+
assets: ["./dist/**/*"],
58+
ignore: ["**/node_modules/**"],
59+
filesToDeleteAfterUpload: ["./dist/**/*.map"],
6460
},
6561
},
6662
),
@@ -78,9 +74,7 @@ export default defineConfig(
7874
/* Your SolidStart config */
7975
},
8076
{
81-
sourceMapsUploadOptions: {
82-
enabled: false,
83-
},
77+
disable: true,
8478
},
8579
),
8680
);

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

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,9 @@ import { sentrySvelteKit } from "@sentry/sveltekit";
4141
export default defineConfig({
4242
plugins: [
4343
sentrySvelteKit({
44-
sourceMapsUploadOptions: {
45-
org: "___ORG_SLUG___",
46-
project: "___PROJECT_SLUG___",
47-
authToken: process.env.SENTRY_AUTH_TOKEN,
48-
},
44+
org: "___ORG_SLUG___",
45+
project: "___PROJECT_SLUG___",
46+
authToken: process.env.SENTRY_AUTH_TOKEN,
4947
}),
5048
sveltekit(),
5149
],
@@ -63,11 +61,9 @@ import { sentrySvelteKit } from "@sentry/sveltekit";
6361
export default defineConfig({
6462
plugins: [
6563
sentrySvelteKit({
66-
sourceMapsUploadOptions: {
67-
org: "___ORG_SLUG___",
68-
project: "___PROJECT_SLUG___",
69-
authToken: process.env.SENTRY_AUTH_TOKEN,
70-
},
64+
org: "___ORG_SLUG___",
65+
project: "___PROJECT_SLUG___",
66+
authToken: process.env.SENTRY_AUTH_TOKEN,
7167
}),
7268
sveltekit(),
7369
],

platform-includes/sourcemaps/upload/primer/javascript.sveltekit.mdx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,11 @@ import { sentrySvelteKit } from "@sentry/sveltekit";
3232
export default {
3333
plugins: [
3434
sentrySvelteKit({
35-
sourceMapsUploadOptions: {
36-
org: "___ORG_SLUG___",
37-
project: "___PROJECT_SLUG___",
38-
authToken: process.env.SENTRY_AUTH_TOKEN,
39-
// If you're self-hosting Sentry, also add your instance URL:
40-
// url: "https://your-self-hosted-sentry.com/",
41-
},
35+
org: "___ORG_SLUG___",
36+
project: "___PROJECT_SLUG___",
37+
authToken: process.env.SENTRY_AUTH_TOKEN,
38+
// If you're self-hosting Sentry, also add your instance URL:
39+
// url: "https://your-self-hosted-sentry.com/",
4240
}),
4341
sveltekit(),
4442
],

0 commit comments

Comments
 (0)