mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-27 00:00:12 +02:00
tracing: use structured location fields for spawned tasks (#4128)
This change enables `tokio-console` to parse the location information for a spawned task into a structured object rather than simply displaying this info as a field on the task. Signed-off-by: Zahari Dichev <[email protected]>
This commit is contained in:
@@ -14,7 +14,9 @@ cfg_trace! {
|
||||
"runtime.spawn",
|
||||
%kind,
|
||||
task.name = %name.unwrap_or_default(),
|
||||
spawn.location = %format_args!("{}:{}:{}", location.file(), location.line(), location.column()),
|
||||
loc.file = location.file(),
|
||||
loc.line = location.line(),
|
||||
loc.col = location.column(),
|
||||
);
|
||||
#[cfg(not(tokio_track_caller))]
|
||||
let span = tracing::trace_span!(
|
||||
|
||||
Reference in New Issue
Block a user