Important Changes
-
feat(sveltekit): Add Compatibility for builtin SvelteKit Tracing (#17423)
This release makes the
@sentry/sveltekit
SDK compatible with SvelteKit's native observability support introduced in SvelteKit version2.31.0
.
If you enable both, instrumentation and tracing, the SDK will now initialize early enough to set up additional instrumentation like database queries and it will pick up spans emitted from SvelteKit.We will follow up with docs how to set up the SDK soon.
For now, If you're on SvelteKit version2.31.0
or newer, you can easily opt into the new feature:-
Enable experimental tracing and instrumentation support in
svelte.config.js
: -
Move your
Sentry.init()
call fromsrc/hooks.server.(js|ts)
to the newinstrumentation.server.(js|ts)
file:// instrumentation.server.ts import * as Sentry from '@sentry/sveltekit'; Sentry.init({ dsn: '...', // rest of your config });
The rest of your Sentry config in
hooks.server.ts
(sentryHandle
andhandleErrorWithSentry
) should stay the same.
If you prefer to stay on the hooks-file based config for now, the SDK will continue to work as previously.
Thanks to the Svelte team and @elliott-with-the-longest-name-on-github for implementing observability support and for reviewing our PR!
-
Other Changes
- fix(react): Avoid multiple name updates on navigation spans (#17438)
Internal Changes
- test(profiling): Add tests for current state of profiling (#17470)
Bundle size 📦
Path | Size |
---|---|
@sentry/browser | 23.59 KB |
@sentry/browser - with treeshaking flags | 22.2 KB |
@sentry/browser (incl. Tracing) | 38.94 KB |
@sentry/browser (incl. Tracing, Replay) | 76.4 KB |
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags | 66.43 KB |
@sentry/browser (incl. Tracing, Replay with Canvas) | 80.97 KB |
@sentry/browser (incl. Tracing, Replay, Feedback) | 92.8 KB |
@sentry/browser (incl. Feedback) | 39.88 KB |
@sentry/browser (incl. sendFeedback) | 28.13 KB |
@sentry/browser (incl. FeedbackAsync) | 32.92 KB |
@sentry/react | 25.27 KB |
@sentry/react (incl. Tracing) | 40.91 KB |
@sentry/vue | 27.97 KB |
@sentry/vue (incl. Tracing) | 40.72 KB |
@sentry/svelte | 23.62 KB |
CDN Bundle | 25.06 KB |
CDN Bundle (incl. Tracing) | 38.82 KB |
CDN Bundle (incl. Tracing, Replay) | 74.24 KB |
CDN Bundle (incl. Tracing, Replay, Feedback) | 79.55 KB |
CDN Bundle - uncompressed | 73.2 KB |
CDN Bundle (incl. Tracing) - uncompressed | 114.83 KB |
CDN Bundle (incl. Tracing, Replay) - uncompressed | 227.23 KB |
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed | 239.53 KB |
@sentry/nextjs (client) | 42.86 KB |
@sentry/sveltekit (client) | 39.38 KB |
@sentry/node-core | 46.87 KB |
@sentry/node | 145.75 KB |
@sentry/node - without tracing | 90.08 KB |
@sentry/aws-serverless | 102.45 KB |