Skip to content

feat(cloudflare): Enable RPC trace propagation with enableRpcTracePropagation#20345

Merged
JPeer264 merged 2 commits intodevelopfrom
jp/hide-rpc-behind-option
Apr 16, 2026
Merged

feat(cloudflare): Enable RPC trace propagation with enableRpcTracePropagation#20345
JPeer264 merged 2 commits intodevelopfrom
jp/hide-rpc-behind-option

Conversation

@JPeer264
Copy link
Copy Markdown
Member

@JPeer264 JPeer264 commented Apr 16, 2026

follow up to #19991

It is better to release it first with an option to be enabled, that would then also be in line with #20343, otherwise .fetch() RPC calls would work without any option and the actual Cap'n'Proto RPC calls wouldn't work without. That would be an odd experience.

New option: enableRpcTracePropagation

instrumentPrototypeMethods has been deprecated in favor of enableRpcTracePropagation

Replaces the deprecated instrumentPrototypeMethods option with a clearer name that describes what it actually does. This option must be enabled on both the caller (Worker) and receiver (Durable Object) sides for trace propagation to work.

It is also worth to mention that the implementation of "instrumenting prototype methods" has changed to a Proxy.

// Worker side
export default Sentry.withSentry(
  (env) => ({
    dsn: env.SENTRY_DSN,
    enableRpcTracePropagation: true,
  }),
  handler,
);

// Durable Object side
export const MyDurableObject = Sentry.instrumentDurableObjectWithSentry(
  (env) => ({
    dsn: env.SENTRY_DSN,
    enableRpcTracePropagation: true,
  }),
  MyDurableObjectBase,
);

@JPeer264 JPeer264 requested review from Lms24 and s1gr1d April 16, 2026 09:36
@JPeer264 JPeer264 self-assigned this Apr 16, 2026
@JPeer264 JPeer264 force-pushed the jp/hide-rpc-behind-option branch from 79e6052 to a11d4ae Compare April 16, 2026 09:42
@github-actions
Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 25.78 kB - -
@sentry/browser - with treeshaking flags 24.27 kB - -
@sentry/browser (incl. Tracing) 43.61 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 45.32 kB - -
@sentry/browser (incl. Tracing, Profiling) 48.51 kB - -
@sentry/browser (incl. Tracing, Replay) 82.74 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 72.25 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 87.43 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 99.67 kB - -
@sentry/browser (incl. Feedback) 42.59 kB - -
@sentry/browser (incl. sendFeedback) 30.45 kB - -
@sentry/browser (incl. FeedbackAsync) 35.45 kB - -
@sentry/browser (incl. Metrics) 27.07 kB - -
@sentry/browser (incl. Logs) 27.2 kB - -
@sentry/browser (incl. Metrics & Logs) 27.89 kB - -
@sentry/react 27.53 kB - -
@sentry/react (incl. Tracing) 45.88 kB - -
@sentry/vue 30.61 kB - -
@sentry/vue (incl. Tracing) 45.45 kB - -
@sentry/svelte 25.8 kB - -
CDN Bundle 28.46 kB - -
CDN Bundle (incl. Tracing) 44.69 kB - -
CDN Bundle (incl. Logs, Metrics) 29.83 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 45.78 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 68.73 kB - -
CDN Bundle (incl. Tracing, Replay) 81.65 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 82.73 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 87.17 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 88.23 kB - -
CDN Bundle - uncompressed 83.12 kB - -
CDN Bundle (incl. Tracing) - uncompressed 133.64 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 87.27 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 137.05 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 210.63 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 250.87 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 254.27 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 263.78 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 267.17 kB - -
@sentry/nextjs (client) 48.42 kB - -
@sentry/sveltekit (client) 44.06 kB - -
@sentry/node-core 57.94 kB +0.02% +6 B 🔺
@sentry/node 174.78 kB +0.01% +7 B 🔺
@sentry/node - without tracing 97.89 kB +0.03% +21 B 🔺
@sentry/aws-serverless 115.12 kB +0.01% +7 B 🔺

View base workflow run

Copy link
Copy Markdown
Member

@s1gr1d s1gr1d left a comment

Choose a reason for hiding this comment

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

Looks good

@JPeer264 JPeer264 merged commit 5f72df5 into develop Apr 16, 2026
114 of 115 checks passed
@JPeer264 JPeer264 deleted the jp/hide-rpc-behind-option branch April 16, 2026 11:25
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.

3 participants