Worker RPC host logs aren't showing up

I'm experimenting with workers RPC and logs from RPC "host" don't get pushed, but show up in wrangler tail. Is there a known limitation around RPC and logpush? Higher-level problem I'm trying to solve is log tracing when multiple workers are involved in a flow. I was assuming RayID would be equal for the worker invoked with fetch and the one called via RPC, but RPC host logs aren't showing up at all 😅
3 Replies
lesnitsky
lesnitskyOP•7mo ago
rpc caller:
export default {
async fetch(request: Request, env: Env) {
const result = await env.RPC_HOST.add(1, 2);
console.log(`Result: ${result}`);
return new Response(`Result: ${result}`);
},
};
export default {
async fetch(request: Request, env: Env) {
const result = await env.RPC_HOST.add(1, 2);
console.log(`Result: ${result}`);
return new Response(`Result: ${result}`);
},
};
rpc host:
import { WorkerEntrypoint } from 'cloudflare:workers';

export default class extends WorkerEntrypoint {
async fetch() {
return new Response('Hello from Worker B');
}

add(a: number, b: number): number {
console.log(`Adding ${a} and ${b}`);
return a + b;
}
}
import { WorkerEntrypoint } from 'cloudflare:workers';

export default class extends WorkerEntrypoint {
async fetch() {
return new Response('Hello from Worker B');
}

add(a: number, b: number): number {
console.log(`Adding ${a} and ${b}`);
return a + b;
}
}
I can only see "Result: 3", but expect to see "Adding 1 and 2" as well
kian
kian•7mo ago
Those logs would be in the tail logs of the 'rpc host' Worker Oh, so you see them in tail but not Logpush? :blobcatthonking:
lesnitsky
lesnitskyOP•7mo ago
yup, host logs aren't pushed it seems
Want results from more Discord servers?
Add your server