Skip to content

feat(sveltekit): Register a route provider backed by reported route ids - #23557

Merged
logaretm merged 0 commit into
awad/route-provider-tanstackfrom
awad/route-provider-sveltekit
Aug 31, 2026
Merged

feat(sveltekit): Register a route provider backed by reported route ids#23557
logaretm merged 0 commit into
awad/route-provider-tanstackfrom
awad/route-provider-sveltekit

Conversation

@logaretm

@logaretm logaretm commented Aug 24, 2026

Copy link
Copy Markdown
Member

Registers a route provider for SvelteKit, for both the Kit 2 and Kit 3 variants.

SvelteKit has no public route matcher and page.route.id is not available synchronously, so this is the first cache-backed provider: it answers from route ids the instrumentation has already reported rather than by matching. Both variants already read the route id to rename the span, so they record it on the way through.

Adds createCachedRouteProvider to core for this, since Solid and Angular need the same thing. Keeps the statefulness private to the provider, so the API stays URL in, string out.

Part of #23556

@logaretm
logaretm force-pushed the awad/route-provider-sveltekit branch from cc6c20e to 1d44621 Compare August 24, 2026 20:17
@github-actions

github-actions Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 28.56 kB - -
@sentry/browser - with treeshaking flags 26.92 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 26.82 kB - -
@sentry/browser (incl. Tracing) 48.96 kB +0.43% +207 B 🔺
@sentry/browser (incl. Tracing + Span Streaming) 48.97 kB +0.43% +205 B 🔺
@sentry/browser (incl. Tracing, Profiling) 51.89 kB +0.41% +211 B 🔺
@sentry/browser (incl. Tracing, Replay) 88.47 kB +0.28% +245 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 77.8 kB +0.23% +173 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 93.16 kB +0.25% +225 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 106.11 kB +0.24% +253 B 🔺
@sentry/browser (incl. Feedback) 46.05 kB - -
@sentry/browser (incl. sendFeedback) 33.62 kB - -
@sentry/browser (incl. FeedbackAsync) 38.73 kB - -
@sentry/browser (incl. Metrics) 29.51 kB - -
@sentry/browser (incl. Logs) 29.8 kB - -
@sentry/browser (incl. Metrics & Logs) 30.43 kB - -
@sentry/react 30.3 kB - -
@sentry/react (incl. Tracing) 51.17 kB +0.45% +225 B 🔺
@sentry/vue 35.73 kB - -
@sentry/vue (incl. Tracing) 51.46 kB +0.87% +440 B 🔺
@sentry/svelte 28.59 kB - -
CDN Bundle 30.72 kB +1.23% +372 B 🔺
CDN Bundle (incl. Tracing) 49.82 kB +0.89% +438 B 🔺
CDN Bundle (incl. Logs, Metrics) 32.98 kB +1.24% +402 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) 51.7 kB +0.88% +450 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) 73.51 kB +0.47% +337 B 🔺
CDN Bundle (incl. Tracing, Replay) 87.28 kB +0.49% +421 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 89.15 kB +0.47% +417 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 93.2 kB +0.44% +400 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 95.14 kB +0.53% +498 B 🔺
CDN Bundle - uncompressed 91.23 kB +1.43% +1.28 kB 🔺
CDN Bundle (incl. Tracing) - uncompressed 148.6 kB +0.96% +1.4 kB 🔺
CDN Bundle (incl. Logs, Metrics) - uncompressed 97.53 kB +1.34% +1.28 kB 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 154.29 kB +0.92% +1.4 kB 🔺
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 226.69 kB +0.57% +1.28 kB 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed 268.1 kB +0.53% +1.4 kB 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 273.77 kB +0.52% +1.4 kB 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 281.8 kB +0.5% +1.4 kB 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 287.46 kB +0.49% +1.4 kB 🔺
@sentry/nextjs (client) 53.99 kB +0.8% +428 B 🔺
@sentry/sveltekit (client) 49.74 kB +1.13% +551 B 🔺
@sentry/core/server 65.67 kB - -
@sentry/core/browser 52.26 kB +0.77% +395 B 🔺
@sentry/node 123.77 kB +0.02% +18 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 85.53 kB - -
@sentry/node - without tracing 88.03 kB +0.02% +14 B 🔺
@sentry/node - without channel injection 103.18 kB +0.03% +22 B 🔺
@sentry/aws-serverless 96.42 kB +0.03% +27 B 🔺
@sentry/cloudflare (withSentry) - minified 201.04 kB - -
@sentry/cloudflare (withSentry) 500.26 kB - -

View base workflow run

@logaretm
logaretm force-pushed the awad/route-provider-sveltekit branch from 1d44621 to 19e3885 Compare August 24, 2026 20:27
@logaretm
logaretm force-pushed the awad/route-provider-sveltekit branch from 19e3885 to cab886c Compare August 24, 2026 20:52
@logaretm
logaretm force-pushed the awad/route-provider-sveltekit branch from cab886c to 6a00322 Compare August 24, 2026 20:57
@logaretm
logaretm force-pushed the awad/route-provider-sveltekit branch 2 times, most recently from 345539d to 690d4e8 Compare August 31, 2026 17:05
@logaretm
logaretm merged commit 690d4e8 into develop Aug 31, 2026
12 of 13 checks passed
@logaretm
logaretm deleted the awad/route-provider-sveltekit branch August 31, 2026 17:06
@logaretm
logaretm restored the awad/route-provider-sveltekit branch August 31, 2026 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant