#Worker RPC host logs aren't showing up

5 messages · Page 1 of 1 (latest)

dense gale
#

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 😅

#

rpc caller:

    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;
    }
}

I can only see "Result: 3", but expect to see "Adding 1 and 2" as well

pine island
#

Those logs would be in the tail logs of the 'rpc host' Worker

#

Oh, so you see them in tail but not Logpush?