split info spans when logging request IDs#420
Conversation
Otherwise we end up with log messages that include multiple request IDs when we are processing concurrent requests.
|
Following #146, concurrent requests would look like: This PR addresses that by using two info spans, one for the tokio task itself and one for handling the request after reading off the receiver channel. |
|
Is the tokio task like a "global span" or is the scope a bit smaller than that? Two reasons:
Also, my question might be irrelevant if I'm thinking of something like OTEL tracing and this is a more basic thing. |
|
The tokio task is the thing that runs the Wasm guest code, so the first span applies only to that task. The bigger issue I think was the span across the This breaks things into two spans, with the same data (the request ID). One for the task which tokio runs (this is basically a revert of #146), and then another one that's created just after the response is taken off the receiver channel, and only applies to the work after it's done. |
I don't think so, but I have only anecdotal evidence. Rrunning 4 services locally and then running a highly parallel integration test suite against them, all the messages that are generated by Viceroy itself include the request ID. |
Otherwise we end up with log messages that include multiple request
IDs when we are processing concurrent requests.