From c65ec0af76407684451ae9e30ac0d8e2ef8bf204 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Sat, 2 May 2020 21:24:18 +0200 Subject: [PATCH] add basic structrue logging to evaluator --- ofborg/src/tasks/evaluate.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ofborg/src/tasks/evaluate.rs b/ofborg/src/tasks/evaluate.rs index 4422f3f..2ee5bfa 100644 --- a/ofborg/src/tasks/evaluate.rs +++ b/ofborg/src/tasks/evaluate.rs @@ -19,7 +19,7 @@ use std::time::Instant; use hubcaps::checks::CheckRunOptions; use hubcaps::gists::Gists; use hubcaps::issues::Issue; -use tracing::{error, info, warn}; +use tracing::{debug_span, error, info, warn}; pub struct EvaluationWorker { cloner: checkout::CachedCloner, @@ -249,6 +249,9 @@ impl<'a, E: stats::SysEvents + 'static> OneEval<'a, E> { // FIXME: remove with rust/cargo update #[allow(clippy::cognitive_complexity)] fn evaluate_job(&mut self) -> Result { + let span = debug_span!("job", pr = ?self.job.pr.number); + let _enter = span.enter(); + let job = self.job; let repo = self .client_app