feat(cloudflare): Support basic WorkerEntrypoint#19884
feat(cloudflare): Support basic WorkerEntrypoint#19884
Conversation
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨Deps
Other
Bug Fixes 🐛
Documentation 📚
Internal Changes 🔧Core
Deps
Deps Dev
Other
🤖 This preview updates automatically when you update the PR. |
3a7024f to f82649e Compare size-limit report 📦
|
71b3910 to 1ef2947 Compare There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
dev-packages/e2e-tests/test-applications/cloudflare-mcp/src/env.d.ts Outdated Show resolved Hide resolved
node-overhead report 🧳Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.
|

part of #15942
This is a basic instrumentation for
WorkerEntrypoint. There is no extrainstrumentWorkerEntrypointexported, and should work directly withwithSentryOOTB:To support the full
WorkerEntrypointthere is the need to instrument RPC methods. Without that we can't fully supportWorkerEntrypoints but just the basics of it. This can be added once #19991 lands (it is safe to review now and instrument the env in a separate PR)If you look at the instrumentations themselves, there is no
isInstrumentedormarkAsInstrumented. The reason is that on the one hand this is not required, as every request is spawning a new instance of theWorkerEntrypointand on the other hand it wouldn't work as it would mark it as instrumented, but on the request thefetchis overridden and not instrumented.