add basic structrue logging to evaluator

This commit is contained in:
Daiderd Jordan 2020-05-02 21:24:18 +02:00
parent 72b41d9ec1
commit c65ec0af76
No known key found for this signature in database
GPG key ID: D02435D05B810C96

View file

@ -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<E> {
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<worker::Actions, EvalWorkerError> {
let span = debug_span!("job", pr = ?self.job.pr.number);
let _enter = span.enter();
let job = self.job;
let repo = self
.client_app