Skip to content

fix(sveltekit): Export metrics from worker entry point - #23026

Merged
Lms24 merged 2 commits into
developfrom
lms/fix-sveltekit-export-cf-metrics
Aug 5, 2026
Merged

fix(sveltekit): Export metrics from worker entry point#23026
Lms24 merged 2 commits into
developfrom
lms/fix-sveltekit-export-cf-metrics

Conversation

@Lms24

@Lms24 Lms24 commented Aug 4, 2026

Copy link
Copy Markdown
Member

I noticed yesterday that the Sentry.metrics APIs are not available in @sentry/sveltekit when deploying to cloudflare. This is because the worker/index.ts file doesn't re-export it. Meaning, locally in dev, everything works but when deployed, the SDK throws an error.

This PR adds the metrics export.

@Lms24
Lms24 requested a review from a team as a code owner August 4, 2026 18:20
@Lms24
Lms24 requested review from chargome and s1gr1d and removed request for a team August 4, 2026 18:20

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 178df81. Configure here.

Comment thread packages/sveltekit/src/worker/index.ts
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 29.83 kB - -
@sentry/browser - with treeshaking flags 28.03 kB - -
@sentry/browser (incl. Tracing) 47.25 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 47.27 kB - -
@sentry/browser (incl. Tracing, Profiling) 52 kB - -
@sentry/browser (incl. Tracing, Replay) 86.59 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 76.01 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 91.28 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 103.95 kB - -
@sentry/browser (incl. Feedback) 47.13 kB - -
@sentry/browser (incl. sendFeedback) 34.67 kB - -
@sentry/browser (incl. FeedbackAsync) 39.78 kB - -
@sentry/browser (incl. Metrics) 30.91 kB - -
@sentry/browser (incl. Logs) 31.14 kB - -
@sentry/browser (incl. Metrics & Logs) 31.81 kB - -
@sentry/react 31.63 kB - -
@sentry/react (incl. Tracing) 49.51 kB - -
@sentry/vue 34.92 kB - -
@sentry/vue (incl. Tracing) 49.24 kB - -
@sentry/svelte 29.86 kB - -
CDN Bundle 31.87 kB - -
CDN Bundle (incl. Tracing) 47.54 kB - -
CDN Bundle (incl. Logs, Metrics) 33.41 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 48.95 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 72.75 kB - -
CDN Bundle (incl. Tracing, Replay) 85.18 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 86.5 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 91.01 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 92.31 kB - -
CDN Bundle - uncompressed 94.62 kB - -
CDN Bundle (incl. Tracing) - uncompressed 142.12 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 99.24 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 146.1 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 223.94 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 261.38 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 265.34 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 275.08 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 279.04 kB - -
@sentry/nextjs (client) 52.08 kB - -
@sentry/sveltekit (client) 47.71 kB - -
@sentry/core/server 65.52 kB - -
@sentry/core/browser 51.88 kB - -
@sentry/node 120.24 kB +0.01% +1 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 0 B added added
@sentry/node - without tracing 83.69 kB +0.01% +1 B 🔺
@sentry/aws-serverless 92.35 kB -0.01% -1 B 🔽
@sentry/cloudflare (withSentry) - minified 218.65 kB - -
@sentry/cloudflare (withSentry) 538.85 kB - -

View base workflow run

@nicohrubec nicohrubec left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

just noticed the test additions are only in the backport, is that on purpose?

Lms24 added a commit that referenced this pull request Aug 4, 2026
@Lms24

Lms24 commented Aug 4, 2026

Copy link
Copy Markdown
Member Author

Not intentional. I thought I pushed them but 🤷
Will add them tomorrow. Thx for flagging!

@Lms24
Lms24 enabled auto-merge (squash) August 5, 2026 06:22
@Lms24 Lms24 self-assigned this Aug 5, 2026
@Lms24
Lms24 merged commit a6bb0eb into develop Aug 5, 2026
49 checks passed
@Lms24
Lms24 deleted the lms/fix-sveltekit-export-cf-metrics branch August 5, 2026 06:30
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.

2 participants