Skip to content

Conversation

chargome
Copy link
Member

No description provided.

github-actions bot and others added 4 commits August 27, 2025 17:21
[Gitflow] Merge master into develop
)

This PR updates our SvelteKit SDK to be compatible with Sveltekit's new
tracing feature, while maintaining backwards compatibility with
Sentry<>SvelteKit setups on previous Kit versions or when SvelteKit's
tracing feature is not used.

If Kit tracing is used, the SDK
- No longer starts its own `http.server` span but uses Kit's
`sveltekit.handle.root` span as the `http.server` root span.
- Configures our `httpIntegration` to avoid emitting a span for the
incoming request span (this is in line with NextJS and Remix)
- Processes kit-emitted spans to include sentry op and origin in an
event preprocessing integration
- Changes the name of root span to Sentry-esque `http.server` name
conventions
  - store original name as `sveltekit.tracing.original_name` attribute
- Still isolates the request in addition 

build time adjustments
- Read tracing config from `svelte.config.js`
- Auto wrap universal `load` functions only for client-side code, if kit
tracing is enabled
While working on
#17279, I added
some tests and this PR is the extracted test for the current behavior.
@chargome chargome self-assigned this Aug 29, 2025
@chargome chargome requested review from mydea and andreiborza August 29, 2025 07:58
Comment on lines +9 to +12
### Important Changes

- **feat(sveltekit): Add Compatibility for builtin SvelteKit Tracing ([#17423](https://github.com/getsentry/sentry-javascript/pull/17423))**

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

m: leftover

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

github-actions bot commented Aug 29, 2025

size-limit report 📦

Path Size % Change Change
@sentry/browser 24.16 kB added added
@sentry/browser - with treeshaking flags 22.73 kB added added
@sentry/browser (incl. Tracing) 39.87 kB added added
@sentry/browser (incl. Tracing, Replay) 78.23 kB added added
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 68.02 kB added added
@sentry/browser (incl. Tracing, Replay with Canvas) 82.91 kB added added
@sentry/browser (incl. Tracing, Replay, Feedback) 95.03 kB added added
@sentry/browser (incl. Feedback) 40.83 kB added added
@sentry/browser (incl. sendFeedback) 28.81 kB added added
@sentry/browser (incl. FeedbackAsync) 33.7 kB added added
@sentry/react 25.88 kB added added
@sentry/react (incl. Tracing) 41.89 kB added added
@sentry/vue 28.64 kB added added
@sentry/vue (incl. Tracing) 41.69 kB added added
@sentry/svelte 24.18 kB added added
CDN Bundle 25.66 kB added added
CDN Bundle (incl. Tracing) 39.75 kB added added
CDN Bundle (incl. Tracing, Replay) 76.03 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) 81.46 kB added added
CDN Bundle - uncompressed 74.96 kB added added
CDN Bundle (incl. Tracing) - uncompressed 117.59 kB added added
CDN Bundle (incl. Tracing, Replay) - uncompressed 232.68 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 245.28 kB added added
@sentry/nextjs (client) 43.89 kB added added
@sentry/sveltekit (client) 40.32 kB added added
@sentry/node-core 47.99 kB added added
@sentry/node 149.25 kB added added
@sentry/node - without tracing 92.24 kB added added
@sentry/aws-serverless 104.91 kB added added

@chargome chargome force-pushed the prepare-release/10.8.0 branch from f44b3f6 to f5d4bd6 Compare August 29, 2025 08:05
envelopeItemIndex: number,
envelopeIndex = 1, // 1 is usually the payload of the envelope (0 is the header)
): T => {
return properEnvelopeParser(request)[envelopeItemIndex]?.[envelopeIndex] as T;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Envelope Request Parser Parameter Shift

The properEnvelopeRequestParser function's signature changed, adding envelopeItemIndex as the second parameter. This redefines the meaning of the second argument for existing callers, shifting it from envelopeIndex to envelopeItemIndex. Consequently, the function now accesses [envelopeItemIndex]?.[1] instead of [0]?.[envelopeIndex], which will cause existing code to extract incorrect data or fail.

Fix in Cursor Fix in Web

@chargome chargome merged commit dbdddc8 into master Aug 29, 2025
354 of 358 checks passed
@chargome chargome deleted the prepare-release/10.8.0 branch August 29, 2025 09:48
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.

5 participants