otel-cf-workers icon indicating copy to clipboard operation
otel-cf-workers copied to clipboard

Instrumentation breaks new RPC style service calls

Open johtso opened this issue 10 months ago • 12 comments

https://blog.cloudflare.com/javascript-native-rpc

If you instrument your worker, and it tries to call a method on a bound service using the new RPC style, you get a TypeError: Illegal invocation error.

[wrangler:err] TypeError: Illegal invocation
    at [object Object]
    at Object.get (file:///xxxxxx/node_modules/.pnpm/@[email protected]/node_modules/@microlabs/otel-cf-workers/src/instrumentation/kv.ts:114:23)
    at proxyHandler.get (file:///xxxxxx/node_modules/.pnpm/@[email protected]/node_modules/@microlabs/otel-cf-workers/src/wrap.ts:23:20)
    at xxxxxxx

johtso avatar Apr 06 '24 23:04 johtso