From 440d12f069dbc5885893e23511c8a55f5b9ec85b Mon Sep 17 00:00:00 2001 From: Martin Magnus Date: Wed, 25 Sep 2024 16:01:53 +0200 Subject: [PATCH] [EASY] Bring back tracing spans for submission (#3014) # Description When we started to submit solutions in a background task with https://github.com/cowprotocol/services/pull/2986 the logs emitted from the submission future lost all the tracing information of the run loop. That means you can no longer easily grep for an auction id in the logs and see the submission logs. # Changes Instruments the submission future with the current tracing span to bring back the auction id and other data that is available while building the future. --- crates/autopilot/src/run_loop.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/autopilot/src/run_loop.rs b/crates/autopilot/src/run_loop.rs index e9770b84f6..cce4374f55 100644 --- a/crates/autopilot/src/run_loop.rs +++ b/crates/autopilot/src/run_loop.rs @@ -313,7 +313,8 @@ impl RunLoop { } } Metrics::single_run_completed(single_run_start.elapsed()); - }; + } + .instrument(tracing::Span::current()); let sender = self.get_settlement_queue_sender(&driver.name).await; if let Err(err) = sender.send(Box::pin(settle_fut)) {