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
{{ message }}
Repository navigation
Commit 595e940
Browse filesBrowse the repository at this point in the historyBrowse files
feat(sveltekit): Detect SvelteKit 3 native tracing from the Vite plugin (#21580)
As of SvelteKit 3, native server-side tracing is no longer configured in
`svelte.config.js` — it's passed to the `sveltekit()` Vite plugin
instead. Our auto-instrumentation plugin derived `onlyInstrumentClient`
from `svelte.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's
`function.sveltekit.server.load` stacked on top of Kit's native
`sveltekit.load`).
This PR now reads the resolved SvelteKit config that the `sveltekit()`
plugin exposes via its plugin `api.options` and 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
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments