diff --git a/crates/core/src/commands/noninteractive.rs b/crates/core/src/commands/noninteractive.rs index a0202d2..0fa7b93 100644 --- a/crates/core/src/commands/noninteractive.rs +++ b/crates/core/src/commands/noninteractive.rs @@ -20,7 +20,7 @@ use tokio::{ sync::Mutex, task::JoinSet, }; -use tracing::{Instrument, debug, instrument, trace}; +use tracing::{Instrument, Level, debug, instrument, trace}; pub struct NonInteractiveChildChip { error_collection: Arc>>, @@ -31,7 +31,7 @@ pub struct NonInteractiveChildChip { stdin: ChildStdin, } -#[instrument(skip_all, name = "run", fields(elevated = %arguments.is_elevated()))] +#[instrument(skip_all, level = Level::DEBUG, name = "run", fields(elevated = %arguments.is_elevated()))] pub async fn non_interactive_command_with_env + Sync>( arguments: &CommandArguments, envs: HashMap, diff --git a/crates/core/src/hive/mod.rs b/crates/core/src/hive/mod.rs index a666ea4..e34e409 100644 --- a/crates/core/src/hive/mod.rs +++ b/crates/core/src/hive/mod.rs @@ -262,7 +262,11 @@ pub enum HiveLocation { } impl HiveLocation { - async fn get_flake(uri: String, modifiers: SubCommandModifiers) -> Result { + #[instrument(skip_all, name = "flake_prefetch", fields(uri = %uri))] + async fn from_flake_uri( + uri: String, + modifiers: SubCommandModifiers, + ) -> Result { let mut command_string = CommandStringBuilder::nix(); command_string.args(&[ "flake", @@ -312,7 +316,7 @@ pub async fn get_hive_location( Some("hive.nix") => HiveLocation::HiveNix(path.clone()), Some(_) => { if fs::metadata(path.join("flake.nix")).is_ok() { - HiveLocation::get_flake(path.display().to_string(), modifiers).await? + HiveLocation::from_flake_uri(path.display().to_string(), modifiers).await? } else { HiveLocation::HiveNix(path.join("hive.nix")) } @@ -338,7 +342,7 @@ pub async fn get_hive_location( | FlakeRef::Tarball { .. } | FlakeRef::Mercurial { .. } | FlakeRef::SourceHut { .. }, - ) => Ok(HiveLocation::get_flake(path, modifiers).await?), + ) => Ok(HiveLocation::from_flake_uri(path, modifiers).await?), Err(err) => Err(HiveLibError::HiveLocationError( HiveLocationError::Malformed(err), )),