Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
noyoshi committed Jan 16, 2025
1 parent f0a7d9f commit 5751b1d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions router/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2079,6 +2079,15 @@ async fn tokenize(
}
}

// Implements Tracing Value for Header Value, to support recording header values
impl tracing::Value for HeaderValue {
fn record(&self, key: &tracing::field::Field, visitor: &mut dyn Visit) {
// Convert HeaderValue to a string representation safely
let value_str = self.to_str().unwrap_or("<invalid utf-8>");
key.record_str(value_str, visitor);
}
}

fn trace_headers(headers: HeaderMap, span: &tracing::Span) {
headers
.get("x-predibase-tenant")
Expand Down

0 comments on commit 5751b1d

Please sign in to comment.