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
@sentry/astro 11.17+: web-vitals is bundled into the client even with bundleSizeOptimizations.excludeTracing: true (+6.4 KB gzip per page) #26902
// sentry.client.config.tsimport{init}from'@sentry/astro';init({dsn: '...',attachStacktrace: false,environment: 'production',// no tracesSampleRate, no integrations});
What happens
With bundleSizeOptimizations.excludeTracing: true and no tracing configured, the client bundle built with 11.18.0 contains the web-vitals package (pulled in by @sentry/browser-utils, build/esm/instrumentation/performanceObserver.js). With 11.14.0 no web-vitals code was in the client bundle. Same application commit, same lockfile otherwise, clean npm ci for both builds.
The two client chunks that carry the SDK, loaded on every page:
Chunk
11.14.0 raw
11.18.0 raw
11.14.0 gzip
11.18.0 gzip
page.*.js
58,370
68,468
21,141
24,422
exports.*.js
34,861
44,318
12,357
15,456
Both
93,231
112,786
33,498
39,878
That is about +6.4 KB gzip (+19%) on every page for a site that only captures errors. The strings resource_load_delay and element_render_delay (the LCP subparts added by #25914 in 11.17.0) appear in the exports chunk, so the web-vitals instrumentation survives tree-shaking even though tracing is excluded.
Expected
With excludeTracing: true, the web-vitals instrumentation and the web-vitals dependency are dropped from the client bundle, as the vendored web-vitals code was before 11.17.0.
A second observation, possibly intended
A local build without SENTRY_AUTH_TOKEN on 11.18.0 leaves 50 .map files in dist/server (server output grows from 6.9 MB to 13.8 MB); the same build on 11.14.0 left none. No .map files are in dist/client in either build. In @sentry/astro's integration the default for deleting maps after upload is now skipped when the build writes a Cloudflare Worker (!buildState.writesCloudflareWorker). If that is by design, a note in the changelog or docs on whether those server maps are expected to remain in the deploy directory would help.
Activity
linear-code commentedon Nov 25, 2026
JS-4163