Skip to content

Conversation

andreiborza
Copy link
Member

@andreiborza andreiborza commented Aug 14, 2025

Fixes The RPC receiver does not implement the method "METHOD_NAME error errors by wrapping methods and putting them back on the prototype.

Added an option instrumentPrototypeMethods to opt into wrapping RPC methods. These are potentially expensive to wrap because each invocation wraps so we provide an option to either enable this as a whole or pass method names that should be wrapped.

Also removes the flag to not record spans because no spans were collected ever. I think this is related to connected traces not working correctly for the SDK? cc @AbhiPrasad.

Closes: #17127

cursor[bot]

This comment was marked as outdated.

@andreiborza andreiborza force-pushed the ab/durable-objects-rpc branch from 119eabd to d231d2a Compare August 25, 2025 13:52
@andreiborza andreiborza changed the title fix(cloudflare): Avoid breaking rpc calls when wrapping DurableObjects feat(cloudflare): Add instrumentPrototypeMethods option to instrument RPC methods for DurableObjects Aug 25, 2025
@andreiborza andreiborza force-pushed the ab/durable-objects-rpc branch from d5132d9 to adcd67d Compare August 25, 2025 15:56
@andreiborza andreiborza force-pushed the ab/durable-objects-rpc branch from 88cac5d to 9401c0f Compare August 27, 2025 09:19
@andreiborza andreiborza force-pushed the ab/durable-objects-rpc branch from 9401c0f to 122d1ca Compare August 27, 2025 09:54
cursor[bot]

This comment was marked as outdated.

Copy link
Member

@chargome chargome left a comment

Choose a reason for hiding this comment

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

LGTM then!

@andreiborza andreiborza force-pushed the ab/durable-objects-rpc branch from 122d1ca to dcffbfa Compare August 27, 2025 09:59
@andreiborza andreiborza merged commit a7acc8f into develop Aug 27, 2025
161 checks passed
@andreiborza andreiborza deleted the ab/durable-objects-rpc branch August 27, 2025 11:48
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.

Cloudflare durable objects instrumentation throwing The RPC receiver does not implement the method "METHOD_NAME error
2 participants