Skip to content

fix(cloudflare): Return the real Durable Object stub when RPC propagation is off - #27098

Draft
andreiborza wants to merge 1 commit into
developfrom
ab/fix-cloudflare-do-stub-rpc
Draft

andreiborza wants to merge 1 commit into
developfrom
ab/fix-cloudflare-do-stub-rpc

Conversation

@andreiborza

@andreiborza andreiborza commented Dec 2, 2026 •

Copy link
Copy Markdown
Member

What

A Durable Object stub from an instrumented namespace is now the real stub when RPC trace propagation is off for that binding, so it can be passed as an RPC argument. Its fetch still sends trace headers.

Why

The SDK returned a Proxy, and workerd rejects it with a DataCloneError. This is the same problem as #27091, for Durable Object stubs.

Sentry traces

Cloudflare Worker in wrangler dev, request GET / that passes env.ROOM.getByName('b') to an RPC method on env.ROOM.getByName('a').

Before, request fails with DataCloneError.

trace-before-do-stub

After, request succeeds.

trace-after-do-stub

…tion is off

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@andreiborza
andreiborza added this pull request to stack #27100 December 2, 2026 23:27
@andreiborza andreiborza changed the title ab/fix cloudflare do stub rpc fix(cloudflare): Return the real Durable Object stub when RPC propagation is off Dec 2, 2026
@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Compared: 4952617 (PR test merge using develop at 29e62cd)

Against: 1c10c6f (develop) · base run #68574

⚠️ Baseline mismatch: 5 commit(s) in the PR build are missing from the baseline. Their size changes also affect this comparison. Compare commits. Re-run once the baseline build for 29e62cd finishes.

Path Size % Change Change
@sentry/browser 30.64 kB - -
@sentry/browser - with treeshaking flags 28.73 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 28.62 kB - -
@sentry/browser (incl. Tracing) 53.98 kB +0.01% +1 B 🔺
@sentry/browser (incl. Tracing Core) 40.82 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 53.98 kB +0.01% +1 B 🔺
@sentry/browser (incl. Tracing, Profiling) 56.86 kB - -
@sentry/browser (incl. Tracing, Replay) 93.96 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 82.52 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 98.8 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 111.75 kB - -
@sentry/browser (incl. Feedback) 48.51 kB +0.01% +1 B 🔺
@sentry/browser (incl. sendFeedback) 31.2 kB - -
@sentry/browser (incl. FeedbackAsync) 36.26 kB +0.01% +1 B 🔺
@sentry/browser (incl. Metrics) 31.96 kB - -
@sentry/browser (incl. Logs) 32.25 kB - -
@sentry/browser (incl. Metrics & Logs) 32.91 kB - -
@sentry/react 32.5 kB - -
@sentry/react (incl. Tracing) 56.46 kB - -
@sentry/vue 38.99 kB - -
@sentry/vue (incl. Tracing) 57.05 kB -0.01% -1 B 🔽
@sentry/svelte 30.68 kB - -
@sentry/effect (client) 42.21 kB -0.01% -1 B 🔽
@sentry/effect (client, incl. Tracing) 55.02 kB - -
@sentry/effect (client, incl. Tracing, Logs, Metrics) 66.5 kB - -
@sentry/remix (Remix 3 client bundle) 59.47 kB -0.01% -1 B 🔽
CDN Bundle 32.45 kB - -
CDN Bundle (incl. Tracing) 54.12 kB - -
CDN Bundle (incl. Logs, Metrics) 35.2 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 56.57 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 76.15 kB - -
CDN Bundle (incl. Tracing, Replay) 91.93 kB -0.01% -1 B 🔽
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 94.44 kB +0.01% +1 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 97.38 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 99.85 kB - -
CDN Bundle - uncompressed 94.67 kB - -
CDN Bundle (incl. Tracing) - uncompressed 160.02 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 103.01 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 167.65 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 233.4 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 280.45 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 288.08 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 292.39 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 300 kB - -
@sentry/nextjs (client) 59.75 kB - -
@sentry/sveltekit (client) 54.8 kB - -
@sentry/astro (client) - rolldown, without tracing 35.73 kB - -
@sentry/core/server 45.91 kB - -
@sentry/core/browser 14.55 kB - -
@sentry/node 157.66 kB - -
@sentry/node/import (ESM hook with diagnostics-channel injection) 83.63 kB - -
@sentry/node - without tracing 89.66 kB +0.01% +1 B 🔺
@sentry/node - without channel injection 146.99 kB +0.01% +1 B 🔺
@sentry/aws-serverless 100.57 kB +0.01% +1 B 🔺
@sentry/cloudflare (withSentry) - minified 213.02 kB +0.08% +150 B 🔺
@sentry/cloudflare (withSentry) 493.72 kB +0.06% +287 B 🔺
@sentry/cloudflare (withSentry, instrumented CommonJS package) - minified 215.96 kB +0.07% +150 B 🔺
@sentry/nextjs/cloudflare (withSentry) - minified 238.44 kB +0.07% +150 B 🔺

View base workflow run

@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

Optional E2E tests

Some optional checks were not successful. They do not block the merge. 1 not successful, 39 successful. See the run.

Check Status
❌ CI: Optional E2E Tests / E2E cloudflare-workers-send-to-sentry Test (optional) Failing after 4m Details
Successful checks
Check Status
✅ CI: Optional E2E Tests / E2E cloudflare-pi-durable (latest) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E hono-5 Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E hono-5 (deno) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E cloudflare-think (ai v6) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-tunnel Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nextjs-14-supabase Test (optional) Successful in 3m Details
✅ CI: Optional E2E Tests / E2E cloudflare-flue-send-to-sentry Test (optional) Successful in 4m Details
✅ CI: Optional E2E Tests / E2E cloudflare-workers-without-tracing-send-to-sentry Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E cloudflare-agent Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E hono-5 (cloudflare) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E gen-ai-libraries (latest) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps (client source maps kept) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5 (development) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (vinext) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nextjs-16 (vinext, bun) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E astro-7 (static trace lifecycle) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E astro-7 Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E vinext-cf-workers (workers cache) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5 (kv-cache) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nextjs-15 (turbo) Test (optional) Successful in 3m Details
✅ CI: Optional E2E Tests / E2E nuxt-5 (bun) Test (optional) Successful in 3m Details
✅ CI: Optional E2E Tests / E2E tanstackstart-react-cloudflare Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E solidstart-2 (delete all) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nuxt-5 (deno) Test (optional) Successful in 3m Details
✅ CI: Optional E2E Tests / E2E nextjs-15 (latest) Test (optional) Successful in 3m Details
✅ CI: Optional E2E Tests / E2E solidstart-2-tunnel Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E hono-5 (bun) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-tunnel (cloudflare) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5 (cloudflare) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E solidstart-2 Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps (no upload) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps (static / nuxt generate) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-4-sourcemaps (Vite server) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E solidstart-2 (no upload) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E nuxt-5-sourcemaps (client source maps enabled by Sentry) Test (optional) Successful in 1m Details
✅ CI: Optional E2E Tests / E2E solidstart-2 (manual upload) Test (optional) Successful in 2m Details
✅ CI: Optional E2E Tests / E2E nuxt-5 Test (optional) Successful in 3m Details
✅ CI: Optional E2E Tests / E2E nextjs-16-tunnel (cloudflare) Test (optional) Successful in 2m Details

This branch has not been deployed

No deployments
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.

1 participant