Skip to content

feat(v10/cloudflare): Auto-instrument the worker entry with withSentry#22540

Merged
andreiborza merged 1 commit into
ab/backport-22422-vite-test-runnerfrom
ab/backport-22433-autoinstrument-withsentry
Jul 23, 2026
Merged

feat(v10/cloudflare): Auto-instrument the worker entry with withSentry#22540
andreiborza merged 1 commit into
ab/backport-22422-vite-test-runnerfrom
ab/backport-22433-autoinstrument-withsentry

Conversation

@andreiborza

Copy link
Copy Markdown
Member

Backport of: #22433

Comment thread packages/cloudflare/src/vite/transform.ts
@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 27.76 kB added added
@sentry/browser - with treeshaking flags 26.2 kB added added
@sentry/browser (incl. Tracing) 46.6 kB added added
@sentry/browser (incl. Tracing + Span Streaming) 48.39 kB added added
@sentry/browser (incl. Tracing, Profiling) 51.36 kB added added
@sentry/browser (incl. Tracing, Replay) 85.85 kB added added
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 75.48 kB added added
@sentry/browser (incl. Tracing, Replay with Canvas) 90.56 kB added added
@sentry/browser (incl. Tracing, Replay, Feedback) 103.21 kB added added
@sentry/browser (incl. Feedback) 44.93 kB added added
@sentry/browser (incl. sendFeedback) 32.55 kB added added
@sentry/browser (incl. FeedbackAsync) 37.69 kB added added
@sentry/browser (incl. Metrics) 28.85 kB added added
@sentry/browser (incl. Logs) 29.07 kB added added
@sentry/browser (incl. Metrics & Logs) 29.77 kB added added
@sentry/react 29.56 kB added added
@sentry/react (incl. Tracing) 48.87 kB added added
@sentry/vue 33.19 kB added added
@sentry/vue (incl. Tracing) 48.56 kB added added
@sentry/svelte 27.79 kB added added
CDN Bundle 30.16 kB added added
CDN Bundle (incl. Tracing) 48.56 kB added added
CDN Bundle (incl. Logs, Metrics) 31.73 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) 49.86 kB added added
CDN Bundle (incl. Replay, Logs, Metrics) 71 kB added added
CDN Bundle (incl. Tracing, Replay) 86.06 kB added added
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 87.37 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) 91.86 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 93.13 kB added added
CDN Bundle - uncompressed 89.91 kB added added
CDN Bundle (incl. Tracing) - uncompressed 146.79 kB added added
CDN Bundle (incl. Logs, Metrics) - uncompressed 94.62 kB added added
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 150.77 kB added added
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 219.38 kB added added
CDN Bundle (incl. Tracing, Replay) - uncompressed 266.02 kB added added
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 269.99 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 279.73 kB added added
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 283.68 kB added added
@sentry/nextjs (client) 51.41 kB added added
@sentry/sveltekit (client) 47.02 kB added added
@sentry/core/server 80.3 kB added added
@sentry/core/browser 66.72 kB added added
@sentry/node-core 63.23 kB added added
@sentry/node 125.82 kB added added
@sentry/node (incl. diagnostics channel injection) 151.28 kB added added
@sentry/node/import (ESM hook with diagnostics-channel injection) 70.03 kB added added
@sentry/node/light 51.37 kB added added
@sentry/node - without tracing 74.95 kB added added
@sentry/aws-serverless 84.19 kB added added
@sentry/cloudflare (withSentry) - minified 197.74 kB added added
@sentry/cloudflare (withSentry) 486.69 kB added added

@andreiborza
andreiborza force-pushed the ab/backport-22422-vite-test-runner branch from e31f0e6 to 80ab6f2 Compare July 23, 2026 11:40
@andreiborza
andreiborza force-pushed the ab/backport-22433-autoinstrument-withsentry branch from fba1699 to 60d87ff Compare July 23, 2026 11:47
Comment thread packages/cloudflare/src/vite/index.ts
@andreiborza
andreiborza marked this pull request as ready for review July 23, 2026 11:51
@andreiborza
andreiborza requested a review from a team as a code owner July 23, 2026 11:51
@andreiborza
andreiborza requested review from JPeer264 and isaacs and removed request for a team July 23, 2026 11:51
@andreiborza
andreiborza force-pushed the ab/backport-22433-autoinstrument-withsentry branch from 60d87ff to 3964526 Compare July 23, 2026 12:03
@andreiborza
andreiborza force-pushed the ab/backport-22422-vite-test-runner branch from 6de02a8 to 4a4ed95 Compare July 23, 2026 12:35
@andreiborza
andreiborza force-pushed the ab/backport-22433-autoinstrument-withsentry branch from 3964526 to 1684122 Compare July 23, 2026 12:35

@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 1684122. Configure here.

if (!JS_EXTENSION_REGEX.test(normalizedId) || !JS_EXTENSION_REGEX.test(entryFilePath)) return undefined;
if (normalizedId.replace(JS_EXTENSION_REGEX, '') !== entryFilePath.replace(JS_EXTENSION_REGEX, '')) {
return undefined;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Entry match collapses .ts and .tsx

Medium Severity

Extension-tolerant entry matching strips any JS-like suffix, so a worker main of index.ts also matches a sibling index.tsx. The client-env guard only covers the browser environment; other environments can still transform the wrong file and inject @sentry/cloudflare into it.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 1684122. Configure here.

@andreiborza
andreiborza force-pushed the ab/backport-22433-autoinstrument-withsentry branch from 1684122 to 248fd65 Compare July 23, 2026 13:19
@andreiborza
andreiborza merged commit 3e5625e into v10 Jul 23, 2026
308 checks passed
@andreiborza
andreiborza deleted the ab/backport-22433-autoinstrument-withsentry branch July 23, 2026 13:40
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.

4 participants