Skip to content

Commit

Permalink
Fix logging of User-Agent header in reqwest-tracing (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeMathWalker authored Apr 26, 2024
1 parent 1954b5c commit 9ac5f69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion reqwest-tracing/src/reqwest_otel_span_macro.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit 9ac5f69

Please sign in to comment.