Fix logging of `User-Agent` header in `reqwest-tracing` (#148)

pull/149/head
Luca Palmieri 2024-04-26 14:54:35 +02:00 committed by GitHub
parent 1954b5c94f
commit 9ac5f691bf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -125,7 +125,7 @@ macro_rules! reqwest_otel_span {
let host_port = url.port_or_known_default().unwrap_or(0) as i64;
let otel_name = $name.to_string();
let header_default = &::http::HeaderValue::from_static("");
let user_agent = format!("{:?}", $request.headers().get("user_agent").unwrap_or(header_default)).replace('"', "");
let user_agent = format!("{:?}", $request.headers().get("user-agent").unwrap_or(header_default)).replace('"', "");
macro_rules! request_span {
($lvl:expr) => {