More specifically, it looks like calling .bind actually returns an RpcPromise, not a function. And then the actual error occurs when calling the "bound" function (which at this point is actually a promise-like object). I didn't spend too much time looking into that, but that was my initial assessment.
I have a fix for this locally, so I'm creating this issue to have an issue ID to reference in my pull request :)
When using this package and calling a Service Binding's RPC property - the following error is thrown.
It admittedly took me a while to figure out where this was coming from, but I finally narrowed it down to the following line of code:
https://github.com/evanderkoogh/otel-cf-workers/blob/6f1c79056776024fd3e816b9e3991527e7217510/src/wrap.ts#L51
More specifically, it looks like calling
.bind
actually returns anRpcPromise
, not a function. And then the actual error occurs when calling the "bound" function (which at this point is actually a promise-like object). I didn't spend too much time looking into that, but that was my initial assessment.I have a fix for this locally, so I'm creating this issue to have an issue ID to reference in my pull request :)