diff --git a/bin/core/src/api/execute/build.rs b/bin/core/src/api/execute/build.rs index 7677f56ff..7038cae22 100644 --- a/bin/core/src/api/execute/build.rs +++ b/bin/core/src/api/execute/build.rs @@ -313,6 +313,7 @@ impl Resolve for State { } } +#[instrument(skip(update))] async fn handle_early_return( mut update: Update, ) -> anyhow::Result { @@ -394,7 +395,7 @@ impl Resolve for State { const BUILDER_POLL_RATE_SECS: u64 = 2; const BUILDER_POLL_MAX_TRIES: usize = 30; -#[instrument] +#[instrument(skip_all, fields(build_id = build.id, update_id = update.id))] async fn get_build_builder( build: &Build, update: &mut Update, @@ -424,7 +425,7 @@ async fn get_build_builder( } } -#[instrument] +#[instrument(skip_all, fields(build_id = build.id, update_id = update.id))] async fn get_aws_builder( build: &Build, config: AwsBuilderConfig, @@ -504,7 +505,7 @@ async fn get_aws_builder( Err(res.err().unwrap()) } -#[instrument(skip(periphery))] +#[instrument(skip(periphery, update))] async fn cleanup_builder_instance( periphery: PeripheryClient, cleanup_data: BuildCleanupData, diff --git a/bin/core/src/api/execute/repo.rs b/bin/core/src/api/execute/repo.rs index 7f6ac50cd..136185f95 100644 --- a/bin/core/src/api/execute/repo.rs +++ b/bin/core/src/api/execute/repo.rs @@ -97,7 +97,7 @@ impl Resolve for State { update.finalize(); if update.success { - update_last_pulled(&repo.name).await; + update_last_pulled_time(&repo.name).await; } handle_update_return(update).await @@ -170,13 +170,14 @@ impl Resolve for State { update.finalize(); if update.success { - update_last_pulled(&repo.name).await; + update_last_pulled_time(&repo.name).await; } handle_update_return(update).await } } +#[instrument(skip_all, fields(update_id = update.id))] async fn handle_update_return( update: Update, ) -> anyhow::Result { @@ -198,7 +199,8 @@ async fn handle_update_return( Ok(update) } -async fn update_last_pulled(repo_name: &str) { +#[instrument] +async fn update_last_pulled_time(repo_name: &str) { let res = db_client() .await .repos