From ffec9dc186c4b7f74c970427611e1968bbdb67e6 Mon Sep 17 00:00:00 2001 From: MartinquaXD Date: Mon, 20 Jan 2025 11:47:18 +0000 Subject: [PATCH] Set `X-REQUEST-ID` header when autopilot sends request to driver --- crates/autopilot/src/infra/solvers/mod.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/autopilot/src/infra/solvers/mod.rs b/crates/autopilot/src/infra/solvers/mod.rs index 0d243805ce..b953e577c3 100644 --- a/crates/autopilot/src/infra/solvers/mod.rs +++ b/crates/autopilot/src/infra/solvers/mod.rs @@ -94,6 +94,9 @@ impl Driver { if let Some(timeout) = timeout { request = request.timeout(timeout); } + if let Some(request_id) = observe::request_id::get_task_local_storage() { + request = request.header("X-REQUEST-ID", request_id); + } let mut response = request.send().await.context("send")?; let status = response.status().as_u16();