fix(sveltekit): Support browser tracing with SvelteKit 3#22264
Draft
Lms24 wants to merge 1 commit into
Draft
Conversation
Select the compatible tracing state API at runtime so existing setups continue to work across SvelteKit 2 and 3. Add preview coverage for pageload and navigation tracing without the removed $app/stores module. Fixes #22263 Co-Authored-By: Cursor <cursoragent@cursor.com> Co-authored-by: Cursor <cursoragent@cursor.com>
chargome
added a commit
that referenced
this pull request
Jul 15, 2026
SvelteKit 3.0.0-next.8 promoted native tracing config out of `experimental` (`kit.experimental.tracing` -> `kit.tracing`) and dropped the `experimental.instrumentation` flag, which broke the app build. Migrate the Vite config to the new API. Client-side capture is also broken on next.8 because the SDK's browser integration imports `$app/stores`, which now throws at runtime (removed in favour of `$app/state`), so the app never hydrates. Skip the client-side tests until SvelteKit 3 browser support lands (#22264); server-side tests pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Support SvelteKit 3 browser tracing without changing existing SDK setup. The integration selects
$app/storesfor SvelteKit 2 and$app/statefor SvelteKit 3, using rune-based navigation observation for the latter. A preview E2E app verifies client startup, pageload tracing, and navigation tracing while existing SvelteKit 2 coverage guards compatibility.Breaking changes: None. The public API and configuration remain unchanged; the peer range is only widened to accept SvelteKit 3.
Fixes #22263