Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,38 +22,42 @@ The Sentry SvelteKit SDK supports automatic code instrumentation and source map

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

## Source Maps Options
## General Options

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.

<SdkOption name="sourceMapsUploadOptions.org" type="string" envVar="SENTRY_ORG">
<SdkOption name="org" type="string" envVar="SENTRY_ORG">

The slug of the Sentry organization associated with the app.
The slug of the Sentry organization associated with the app.

</SdkOption>

<SdkOption name="sourceMapsUploadOptions.project" type="string" envVar="SENTRY_PROJECT">
<SdkOption name="project" type="string" envVar="SENTRY_PROJECT">

The slug of the Sentry project associated with the app.
The slug of the Sentry project associated with the app.

</SdkOption>

<SdkOption name="sourceMapsUploadOptions.authToken" type="string" envVar="SENTRY_AUTH_TOKEN">
<SdkOption name="authToken" type="string" envVar="SENTRY_AUTH_TOKEN">

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

</SdkOption>

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

The base URL of your Sentry instance. Only relevant if you're using a self-hosted or Sentry instance other than sentry.io.
The base URL of your Sentry instance. Only relevant if you're using a self-hosted or Sentry instance other than sentry.io.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a case where someone is using a different Sentry instance that isn't self-hosted? Or can this be simplified to "Only relevant if you're using a self-hosted Sentry instance."?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, but I would still include the first sentence as it explains what it is.


</SdkOption>

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

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

</SdkOption>

## Source Maps Options

<SdkOption name="autoUploadSourceMaps" type="boolean">

Disable automatic source maps upload by setting `autoUploadSourceMaps` to `false`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ export default defineConfig(
/* Your SolidStart config */
},
{
sourceMapsUploadOptions: {
unstable_sentryVitePluginOptions: {
applicationKey: "your-custom-application-key",
},
unstable_sentryVitePluginOptions: {
applicationKey: "your-custom-application-key",
},
},
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
export default defineConfig({
plugins: [
sentrySvelteKit({
sourceMapsUploadOptions: {
unstable_sentryVitePluginOptions: {
applicationKey: "your-custom-application-key",
},
unstable_sentryVitePluginOptions: {
applicationKey: "your-custom-application-key",
},
})
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,12 +320,10 @@ import { sentrySvelteKit } from "@sentry/sveltekit";
export default {
plugins: [
sentrySvelteKit({
sourceMapsUploadOptions: {
org: "___ORG_SLUG___",
project: "___PROJECT_SLUG___",
// store your auth token in an environment variable
authToken: process.env.SENTRY_AUTH_TOKEN,
},
org: "___ORG_SLUG___",
project: "___PROJECT_SLUG___",
// store your auth token in an environment variable
authToken: process.env.SENTRY_AUTH_TOKEN,
}),
sveltekit(),
],
Expand Down
28 changes: 11 additions & 17 deletions platform-includes/sourcemaps/overview/javascript.solidstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,9 @@ export default defineConfig(
/* Your SolidStart config */
},
{
sourceMapsUploadOptions: {
org: "___ORG_SLUG___",
project: "___PROJECT_SLUG___",
authToken: process.env.SENTRY_AUTH_TOKEN,
},
org: "___ORG_SLUG___",
project: "___PROJECT_SLUG___",
authToken: process.env.SENTRY_AUTH_TOKEN,
},
),
);
Expand All @@ -52,15 +50,13 @@ export default defineConfig(
/* Your SolidStart config */
},
{
sourceMapsUploadOptions: {
org: "___ORG_SLUG___",
project: "___PROJECT_SLUG___",
authToken: process.env.SENTRY_AUTH_TOKEN,
sourcemaps: {
assets: ["./dist/**/*"],
ignore: ["**/node_modules/**"],
filesToDeleteAfterUpload: ["./dist/**/*.map"],
},
org: "___ORG_SLUG___",
project: "___PROJECT_SLUG___",
authToken: process.env.SENTRY_AUTH_TOKEN,
sourcemaps: {
assets: ["./dist/**/*"],
ignore: ["**/node_modules/**"],
filesToDeleteAfterUpload: ["./dist/**/*.map"],
},
},
),
Expand All @@ -78,9 +74,7 @@ export default defineConfig(
/* Your SolidStart config */
},
{
sourceMapsUploadOptions: {
enabled: false,
},
disable: true,
},
),
);
Expand Down
16 changes: 6 additions & 10 deletions platform-includes/sourcemaps/overview/javascript.sveltekit.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,9 @@ import { sentrySvelteKit } from "@sentry/sveltekit";
export default defineConfig({
plugins: [
sentrySvelteKit({
sourceMapsUploadOptions: {
org: "___ORG_SLUG___",
project: "___PROJECT_SLUG___",
authToken: process.env.SENTRY_AUTH_TOKEN,
},
org: "___ORG_SLUG___",
project: "___PROJECT_SLUG___",
authToken: process.env.SENTRY_AUTH_TOKEN,
}),
sveltekit(),
],
Expand All @@ -63,11 +61,9 @@ import { sentrySvelteKit } from "@sentry/sveltekit";
export default defineConfig({
plugins: [
sentrySvelteKit({
sourceMapsUploadOptions: {
org: "___ORG_SLUG___",
project: "___PROJECT_SLUG___",
authToken: process.env.SENTRY_AUTH_TOKEN,
},
org: "___ORG_SLUG___",
project: "___PROJECT_SLUG___",
authToken: process.env.SENTRY_AUTH_TOKEN,
}),
sveltekit(),
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,11 @@ import { sentrySvelteKit } from "@sentry/sveltekit";
export default {
plugins: [
sentrySvelteKit({
sourceMapsUploadOptions: {
org: "___ORG_SLUG___",
project: "___PROJECT_SLUG___",
authToken: process.env.SENTRY_AUTH_TOKEN,
// If you're self-hosting Sentry, also add your instance URL:
// url: "https://your-self-hosted-sentry.com/",
},
org: "___ORG_SLUG___",
project: "___PROJECT_SLUG___",
authToken: process.env.SENTRY_AUTH_TOKEN,
// If you're self-hosting Sentry, also add your instance URL:
// url: "https://your-self-hosted-sentry.com/",
}),
sveltekit(),
],
Expand Down
Loading