Uh oh!
There was an error while loading. Please reload this page.
feat(sveltekit): Detect SvelteKit 3 native tracing from the Vite plugin - #21580
Conversation
This pull request has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you apply the label |
d0c2dba to
6f71d37Compare06ac632 to
30c37eeComparechargome
commented
Jul 15, 2026
bugbot run |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 30c37ee. Configure here.
Uh oh!
There was an error while loading. Please reload this page.
…nfig SvelteKit 3.0.0-next.8 promoted the native server-tracing config out of `experimental` (`kit.experimental.tracing.server` -> `kit.tracing.server`). Read both locations when detecting native tracing so the SDK works across the supported peer range (SvelteKit 2.31+ and early Kit 3 prereleases keep it under `experimental`). Applies to detection from both the Vite plugin `api.options` and `svelte.config.js`, and covers both shapes in the unit tests. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
30c37ee to
a2b8566Compare
As of SvelteKit 3, native server-side tracing is no longer configured in
svelte.config.js— it's passed to thesveltekit()Vite plugin instead. Our auto-instrumentation plugin derivedonlyInstrumentClientfromsvelte.config.js, so under Kit 3 it could no longer tell that native tracing was enabled and kept injecting its own server-side load instrumentation. The result was duplicate spans (the SDK'sfunction.sveltekit.server.loadstacked on top of Kit's nativesveltekit.load).This PR now reads the resolved SvelteKit config that the
sveltekit()plugin exposes via its pluginapi.optionsand treats it as the source of truth for Kit 3.When native server tracing is enabled there, we skip our own server-load instrumentation. On older SvelteKit versions that don't expose the config this way, detection falls back to the existing
svelte.config.js-derived value — so nothing changes for Kit 2.ref #21502