From 6b93498d487b382826b31b98ea16e6489da64ba4 Mon Sep 17 00:00:00 2001 From: Oliver Gould Date: Wed, 31 Jul 2024 11:49:24 -0700 Subject: [PATCH] fix(http): Set logging contexts on HTTP/1 clients (#3106) 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. --- linkerd/proxy/http/src/h1.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/linkerd/proxy/http/src/h1.rs b/linkerd/proxy/http/src/h1.rs index 3401458426..d897baf592 100644 --- a/linkerd/proxy/http/src/h1.rs +++ b/linkerd/proxy/http/src/h1.rs @@ -1,6 +1,7 @@ use crate::{ glue::HyperConnect, upgrade::{Http11Upgrade, HttpConnect}, + TracingExecutor, }; use futures::prelude::*; use http::{ @@ -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(), @@ -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(),