Skip to content

Commit

Permalink
Set X-REQUEST-ID header when autopilot sends request to driver
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinquaXD committed Jan 20, 2025
1 parent 9a83e51 commit ffec9dc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/autopilot/src/infra/solvers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit ffec9dc

Please sign in to comment.