Title: Support new SvelteKit tracing feature · Issue #16982 · getsentry/sentry-javascript · GitHub
Open Graph Title: Support new SvelteKit tracing feature · Issue #16982 · getsentry/sentry-javascript
X Title: Support new SvelteKit tracing feature · Issue #16982 · getsentry/sentry-javascript
Description: Currently testing a preview of SvelteKit's new tracing feature. This issue will eventually collect all steps we need to take to ensure compatibility with Kit's new feature as well as with kit versions where it is not enabled or not yet a...
Open Graph Description: Currently testing a preview of SvelteKit's new tracing feature. This issue will eventually collect all steps we need to take to ensure compatibility with Kit's new feature as well as with kit versi...
X Description: Currently testing a preview of SvelteKit's new tracing feature. This issue will eventually collect all steps we need to take to ensure compatibility with Kit's new feature as well as with k...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/16982
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Support new SvelteKit tracing feature","articleBody":"Currently testing a preview of SvelteKit's new tracing feature. This issue will eventually collect all steps we need to take to ensure compatibility with Kit's new feature as well as with kit versions where it is not enabled or not yet available. \n\nFor now, I'm just noting down some stuff but we'll extract that to proper sub issues later.\n\nStep 1: Establish Compatibility\n\n- `sentryHandle` should not create a span or isolate requests if `event.tracing.enabled` is `true` (thanks for including the tracing info on the event @elliott-with-the-longest-name-on-github 🙏 )\n - Which begs the question: Do we need it at all? We do capture errors in it but we'd likely capture them as well in an outer context via our general instrumentation. Let's ensure it doesn't break the experience for tracing first and then re-evaluate.\n- Right now, even with `sentryHandle` turned off, it seems like `sveltekit.handle.root` become root spans but not child spans of the http span coming from our/OTel's `HttpInstrumentation`. Tested on Node adapter. Need to check if we can fix this or if this needs a fix in kit. \n- In general, one request now creates multiple root spans. I'm suspecting our request isolation to be at fault but not sure yet how to fix.\n - The good news is that they're all trace-connected.\n - The bad news is that sentry's transaction model is problematic here, given each root span creates a new transaction. Increases billing (potentially). We need to fix this somehow.\n- Write a guide how to set up the SDK with Kit's tracing enabled.\n\nStep 2: Full Support\n- ensure our build time auto instrumentation doesn't apply since Kit does this now 🎉 In a first step, we'll instruct users to set `autoInstrument: false` in our vite plugin but long term, we should be able to read the tracing config automatically from `svelte.config.js`\n- Process spans from Kit to include `sentry.op` and `sentry.origin` attributes.\n- Ensure root `http.server` span (`HttpInstrumentation`) picks up correct route name. \n- Deprecate `wrap(Server)LoadWithSentry` and `wrapApiRouteWithSentry`. The migration path for users is upgrading to kit and enabling tracing. But we'll _not_ drop support for older Kit versions anytime soon.\n- Update docs with the final config\n\n\n","author":{"url":"https://github.com/Lms24","@type":"Person","name":"Lms24"},"datePublished":"2025-07-14T13:18:09Z","url":"https://github.com/getsentry/sentry-javascript/issues/16982"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:716d7c38-132b-be83-3d0f-0aed21817282 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 98FA:2054A4:167B355:1D576BE:6B054B07 |
| html-safe-nonce | cc6926a95c19b786be0ec5ace77089beba213e138de4f82e76241370e86b2e56 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OEZBOjIwNTRBNDoxNjdCMzU1OjFENTc2QkU6NkIwNTRCMDciLCJ2aXNpdG9yX2lkIjoiNjM2ODAzMzYzMjMwMDY0OTIyMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 4607dd07aaa7310b37bb95602019db82b09bd017de96cacc4f17afd23355dcca |
| hovercard-subject-tag | issue:3228752899 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/16982/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0fa823e62ea06261a2677360bf8311e8c65e9208ff26268c426f84c45a99896f/getsentry/sentry-javascript/issues/16982 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0fa823e62ea06261a2677360bf8311e8c65e9208ff26268c426f84c45a99896f/getsentry/sentry-javascript/issues/16982 |
| og:image:alt | Currently testing a preview of SvelteKit's new tracing feature. This issue will eventually collect all steps we need to take to ensure compatibility with Kit's new feature as well as with kit versi... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Lms24 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 854d880890b5e847b3fce9d1b31f032107baeddeebad2aa379c48aa4f1451f6b |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 3328572 |
| octolytics-dimension-repository_nwo | getsentry/sentry-javascript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3328572 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-javascript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 220e980097d94ce616d5d11fbd5316d208e3fc93 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width