Skip to content

Commit

Permalink
fix(http): Set logging contexts on HTTP/1 clients (#3106)
Browse files Browse the repository at this point in the history
HTTP/1 clients do not preserve the calling trace context, so Hyper client debug
logs are emitted without context metadata.

This change updates the HTTP/1 client to use an executor that preserves the
tracing context.
  • Loading branch information
olix0r authored Jul 31, 2024
1 parent 13941bd commit 6b93498
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions linkerd/proxy/http/src/h1.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use crate::{
glue::HyperConnect,
upgrade::{Http11Upgrade, HttpConnect},
TracingExecutor,
};
use futures::prelude::*;
use http::{
Expand Down Expand Up @@ -96,6 +97,7 @@ where
hyper::Client::builder()
.pool_max_idle_per_host(0)
.set_host(use_absolute_form)
.executor(TracingExecutor)
.build(HyperConnect::new(
self.connect.clone(),
self.target.clone(),
Expand All @@ -122,6 +124,7 @@ where
.pool_max_idle_per_host(self.pool.max_idle)
.pool_idle_timeout(self.pool.idle_timeout)
.set_host(use_absolute_form)
.executor(TracingExecutor)
.build(HyperConnect::new(
self.connect.clone(),
self.target.clone(),
Expand Down

0 comments on commit 6b93498

Please sign in to comment.