-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Instrumentation breaks new RPC style service calls #116
Comments
Should be fixed in |
Seems to be working! I'm guessing there's no way to get tracing between a worker and a called RPC service atm, even with manual steps right? Do you think there might be a way to at least do manual traces from inside a named service? |
Hmm, also my custom spans don't seem to be working anymore.. await ping()
const span = tracer.startSpan('parsePdf');
const pdfData = await env.PDFPARSER_SERVICE.parsePdf(request);
await ping()
span.end() |
Hey, could you elaborate on "don't seem to be working" a bit, please - please make sure you have no sampling on, and for debugging could you console.log |
@DaniFoldi ah, it was this issue and this fix.. #115 (comment) |
Glad to hear you managed to fix it. I have it on my todo list to set up peerDependencies properly |
The fix released here appears to have broken regular service bindings (no RPC). The |
Hey @khiller-cf, I believe you're right, since there are no _non_JSRPC service bindings, we currently miss instrumenting all of them. The initial fix was just to avoid matching them as anything, as they would've had all imaginable properties. Are you able to test the following change in instrumentation/env.ts: if (isJSRPC(item)) {
// TODO instrument JSRPC and maybe remove serviceBinding?
return instrumentServiceBinding(item, String(prop))
} else if (isKVNamespace(item)) { The current (temporary) solution passes any JSRPC found back without instrumentation, this change would at least instrument |
That resolves the issue for me. Appreciate you looking at this! |
Released in |
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.The text was updated successfully, but these errors were encountered: