You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* 'master' of https://github.com/getsentry/sentry-docs:
fix(native): add another `crashpad` benefit on macOS to the backend tradeoffs (#13535)
chore(develop): Update frontend router testing guidance (#13538)
Bump API schema to 1bf27325 (#13537)
Fix HTTP headers section in data collected for Java and Android SDK (#13530)
Add "Data Collected" page for Unreal Engine SDK (#13532)
feat(seer): Update seer docs (#13448)
Add an FAQ to trace propagation cheat sheet (#13528)
Remove note about 40M SourceMap Limit (#13499)
docs(js): Create SvelteKit Quick Start guide (Wizard setup) (#13480)
add godot and maui to platforms with screenshot (#13493)
When using `render()`, an in-memory router is used, which will react to navigations with `useNavigate()` or interations with `Link` components. If your component relies on the URL, you can define the initial state in `initialRouterConfig`. You can access the current router state by referencing the returned `router` class, as well as navigate programmatically with `router.navigate()`.
Copy file name to clipboardExpand all lines: develop-docs/sdk/telemetry/traces/trace-propagation-cheat-sheet.mdx
+6
Original file line number
Diff line number
Diff line change
@@ -37,3 +37,9 @@ This is a cheat sheet where you can see how the trace propagation work in SDKs i
37
37
| present | 0 | no | null | no | no | - |
38
38
| present | 0 | no | 0 | no | no | - |
39
39
| present | 0 | no | 1 | no | no | - |
40
+
41
+
## FAQ
42
+
43
+
**Why are we sometimes sampling even if `traces_sample_rate` is 0? Why are we sometimes unsampling if `traces_sample_rate` is 1?**
44
+
45
+
A `traces_sample_rate` between 0 and 1 is only taken into account if there is no incoming trace and the SDK has to make its own sampling decision. If there is an incoming trace, the parent sampling decision always takes precedence over `traces_sample_rate`.
Copy file name to clipboardExpand all lines: docs/platforms/android/data-management/data-collected.mdx
+1-1
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ Many of the categories listed here require you to enable the <PlatformLink to="/
12
12
13
13
## HTTP Headers
14
14
15
-
By default, the Sentry SDK doesn't send any HTTP headers. Even when sending HTTP headers is enabled, we have a [denylist](https://github.com/getsentry/sentry-java/blob/main/sentry/src/main/java/io/sentry/util/HttpUtils.java#L21-L34) in place, which filters out any headers that contain sensitive data.
15
+
By default, the Sentry SDK doesn't send any headers for outgoing HTTP request. Even when sending HTTP headers is enabled, we have a [denylist](https://github.com/getsentry/sentry-java/blob/main/sentry/src/main/java/io/sentry/util/HttpUtils.java#L21-L34) in place, which filters out any headers that contain sensitive data.
16
16
17
17
To start sending HTTP headers, set <PlatformLinkto="/configuration/options/#send-default-pii">`sendDefaultPii=true`</PlatformLink>.
Copy file name to clipboardExpand all lines: docs/platforms/java/common/data-management/data-collected.mdx
+11-3
Original file line number
Diff line number
Diff line change
@@ -12,9 +12,17 @@ For many of the categories listed here it is required to enable the <PlatformLin
12
12
13
13
## HTTP Headers
14
14
15
-
By default, the Sentry SDK doesn't send any HTTP headers. Even when sending HTTP headers is enabled, we have a [denylist](https://github.com/getsentry/sentry-java/blob/main/sentry/src/main/java/io/sentry/util/HttpUtils.java#L21-L34) in place, which filters out any headers that contain sensitive data.
15
+
### Outgoing Requests
16
16
17
-
To start sending HTTP headers, set <PlatformLinkto="/configuration/options/#send-default-pii">`sendDefaultPii=true`</PlatformLink>.
17
+
By default, the Sentry SDK doesn't send any headers for outgoing HTTP requests. Even when sending HTTP headers is enabled, we have a [denylist](https://github.com/getsentry/sentry-java/blob/main/sentry/src/main/java/io/sentry/util/HttpUtils.java#L21-L34) in place, which filters out any headers that contain sensitive data.
18
+
19
+
To send all HTTP headers, set <PlatformLinkto="/configuration/options/#send-default-pii">`sendDefaultPii=true`</PlatformLink>.
20
+
21
+
### Incoming Requests
22
+
23
+
By default, the Sentry SDK sends headers for incoming HTTP requests to Sentry but filters out any headers that contain sensitive data. (See the [list of headers](https://github.com/getsentry/sentry-java/blob/main/sentry/src/main/java/io/sentry/util/HttpUtils.java#L21-L34) that are filtered).
24
+
25
+
To send all HTTP headers, set <PlatformLinkto="/configuration/options/#send-default-pii">`sendDefaultPii=true`</PlatformLink>.
18
26
19
27
## Cookies
20
28
@@ -52,7 +60,7 @@ The request body of incoming HTTP requests can be sent to Sentry. Whether it's s
52
60
53
61
## Source Context
54
62
55
-
Our build tool plugins for Gradle and Maven can upload your source code to Sentry, which can then used to show the lines of code where an error happened in the Issue Details page.
63
+
Our build tool plugins for Gradle and Maven can upload your source code to Sentry, which can then used to show the lines of code where an error happened in the Issue Details page.
56
64
57
65
To opt into sending this source context to Sentry, you have to enable the feature as described in <PlatformLinkto="/source-context/">the Source Context documentation</PlatformLink>.
description: "Learn how to set up and configure Sentry in your SvelteKit application using the installation wizard, capture your first errors, and view them in Sentry."
3
4
sdk: sentry.javascript.sveltekit
4
5
categories:
5
6
- javascript
@@ -8,110 +9,71 @@ categories:
8
9
- server-node
9
10
---
10
11
11
-
Sentry's SvelteKit SDK enables automatic reporting of errors and performance data.
12
-
13
-
## Compatibility
14
-
15
-
The minimum supported SvelteKit version is `2.0.0`.
16
-
This SDK works best with **Vite 4.2** and newer. Older Vite versions might not generate source maps correctly.
17
-
18
-
<Alert>
19
-
20
-
The SvelteKit SDK is designed to work out of the box with the following SvelteKit adapters:
21
-
22
-
-[Adapter-auto](https://kit.svelte.dev/docs/adapter-auto) - for Vercel; other platforms might work but we don't guarantee compatibility at this time.
23
-
-[Adapter-vercel](https://kit.svelte.dev/docs/adapter-vercel) - only for Node (Lambda) runtimes, not yet Vercel's edge runtime.
24
-
-[Adapter-cloudflare](https://kit.svelte.dev/docs/adapter-cloudflare) - supported but requires [additional Setup](/platforms/javascript/guides/cloudflare/frameworks/sveltekit/).
Sentry captures data by using an SDK within your application’s runtime.
39
-
40
-
We recommend installing the SDK by running our installation wizard in the root directory of your project:
16
+
To install Sentry using the installation wizard, run the following command within your project:
41
17
42
18
```bash
43
19
npx @sentry/wizard@latest -i sveltekit
44
20
```
45
21
46
-
The wizard will prompt you to log in to Sentry. It will then automatically do the following steps for you:
47
-
48
-
- create or update SvelteKit files with the default Sentry configuration:
49
-
-`hooks.(client|server).js` to initialize the SDK and instrument [SvelteKit's hooks](https://kit.svelte.dev/docs/hooks)
50
-
-`vite.config.js` to add source maps upload and auto-instrumentation via Vite plugins.
51
-
- create a `.sentryclirc` file with an auth token to upload source maps (this file is automatically added to `.gitignore`)
52
-
- add an example page to your app to verify your Sentry setup
22
+
The wizard then guides you through the setup process, asking you to enable additional (optional) Sentry features for your application beyond error monitoring.
53
23
54
-
After the wizard setup is completed, the SDK will automatically capture unhandled errors, and monitor performance.
55
-
You can also <PlatformLinkto="/usage/">manually capture errors</PlatformLink>.
This guide assumes that you enable all features and allow the wizard to create an example page. You can add or remove features at any time, but setting them up now will save you the effort of configuring them manually later.
58
27
59
-
If the setup through the wizard doesn't work for you, you can also <PlatformLinkto="/manual-setup/">set up the SDK manually</PlatformLink>.
28
+
<Expandabletitle="What does the installation wizard change inside your application?">
60
29
61
-
</Alert>
30
+
- Creates or updates `hooks.(client|server).js` to initialize the SDK and instrument [SvelteKit's hooks](https://kit.svelte.dev/docs/hooks)
31
+
- Creates or updates `vite.config.js` to add source maps upload and auto-instrumentation via Vite plugins
32
+
- Creates `.sentryclirc` with an auth token to upload source maps (this file is automatically added to `.gitignore`)
33
+
- Adds an example page to your application to help verify your Sentry setup
62
34
63
-
## Configure
35
+
</Expandable>
64
36
65
-
Configuration should happen as early as possible in your application's lifecycle.
37
+
## Step 2: Verify Your Setup
66
38
67
-
To complete your configuration, add <PlatformLinkto="/configuration/options/">options</PlatformLink> to your `Sentry.init()` calls.
68
-
Here you can also set context data - data about the <PlatformLinkto="/enriching-events/identify-user/">user</PlatformLink>, for example, or <PlatformLinkto="/enriching-events/tags/">tags</PlatformLink>, or even <PlatformLinkto="/enriching-events/context/">arbitrary data</PlatformLink> - which will be added to every event sent to Sentry.
39
+
If you haven't tested your Sentry configuration yet, let's do it now. You can confirm that Sentry is working properly and sending data to your Sentry project by using the example page and route created by the installation wizard:
69
40
41
+
1. Open the example page `/sentry-example-page` in your browser
42
+
2. Click the "Throw Sample Error" button. This triggers two errors:
43
+
- a frontend error
44
+
- an error within the API route
70
45
71
-
## Verify
46
+
Sentry captures both of these errors for you. Additionally, the button click starts a trace to measure the time it takes for the API request to complete.
72
47
73
-
This snippet includes an intentional error, so you can test that everything is working as soon as you set it up.
48
+
<Alertlevel="success"title="Tip">
74
49
75
-
Add a button to a frontend component that throws an error:
Errors triggered from within Browser DevTools are sandboxed and will not trigger error monitoring. Keep this in mind when verifying your Sentry SDK installation.
64
+
At this point, you should have integrated Sentry into your SvelteKit application and should already be sending error and performance data to your Sentry project.
108
65
109
-
</Alert>
66
+
Now's a good time to customize your setup and look into more advanced topics.
67
+
Our next recommended steps for you are:
110
68
111
-
<Alert>
69
+
- Learn how to [manually capture errors](/platforms/javascript/guides/sveltekit/usage/)
70
+
- Continue to [customize your configuration](/platforms/javascript/guides/sveltekit/configuration/)
71
+
- Get familiar with [Sentry's product features](/product) like tracing, insights, and alerts
112
72
113
-
Learn more about manually capturing an error or message in our <PlatformLinkto="/usage/">Usage documentation</PlatformLink>.
73
+
<Expandablepermalink={false}title="Are you having problems setting up the SDK?">
114
74
115
-
</Alert>
75
+
- If you encountered issues with our installation wizard, try [setting up Sentry manually](/platforms/javascript/guides/sveltekit/manual-setup/)
76
+
- Find various support topics in [troubleshooting](/platforms/javascript/guides/sveltekit/troubleshooting/)
To view and resolve the recorded error, log into [sentry.io](https://sentry.io) and select your project. Clicking on the error's title will open a page where you can see detailed information and mark it as resolved.
0 commit comments