feat: put step logs in a span (#746)

This commit is contained in:
SteveLauC
2024-03-16 14:17:19 +08:00
committed by GitHub
parent 9518f43866
commit 351922c81f
2 changed files with 9 additions and 5 deletions

View File

@@ -34,6 +34,14 @@ impl<'a> Runner<'a> {
let key = key.into();
debug!("Step {:?}", key);
// alter the `func` to put it in a span
let func = || {
let span =
tracing::span!(parent: tracing::Span::none(), tracing::Level::TRACE, "step", step = ?step, key = %key);
let _guard = span.enter();
func()
};
loop {
match func() {
Ok(()) => {