Skip to content

Commit

Permalink
add span instead of log level fields
Browse files Browse the repository at this point in the history
  • Loading branch information
aumetra committed Mar 2, 2024
1 parent 357f045 commit 4082282
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions crates/kitsune-wasm-mrf/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,18 +151,22 @@ impl MrfService {
continue;
};

let span = info_span!(
"load_mrf_module_config",
name = %manifest_v1.name,
version = %manifest_v1.version,
);
let _enter_guard = span.enter();

let config = config
.module_config
.get(&*manifest_v1.name)
.cloned()
.inspect(|_| {
debug!(
name = %manifest_v1.name,
version = %manifest_v1.version,
"found configuration",
);
})
.unwrap_or_default();
.inspect(|_| debug!("found configuration"))
.unwrap_or_else(|| {
debug!("didn't find configuration. defaulting to empty string");
SmolStr::default()
});

let module = MrfModule {
component,
Expand Down

0 comments on commit 4082282

Please sign in to comment.