Replies: 1 comment 1 reply
-
I'm not sure what you mean by this, but I'm guessing you're referring to the fact that logs in
I would recommend reading the documentation on spans which explains how they are used and why changing the code as you did makes things work. spans do not have a full 1:1 analogue to slog's |
Beta Was this translation helpful? Give feedback.
-
Sometimes, when I enable logging in the main function like:
.. and spawn threads like:
Logging functions in
rpc.do_main
are not captured. But if I change it to:Logging functions in
rpc.do_main
work properly.Is there some best practices I understand this case? How can I properly config tracing manner and how can I add context kv like
slog
Logger::new
.FYI - I don't know what
trace_span
does, just randomly place some statements as a guess.Beta Was this translation helpful? Give feedback.
All reactions