Skip to content

Commit 8d46c40

Browse files
authored
fix: Support HttpClient implementation for HyperClient with custom connectors (#3057)
1 parent eac368a commit 8d46c40

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

opentelemetry-http/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## vNext
44

55
- Implementation of `Extractor::get_all` for `HeaderExtractor`
6+
- Support `HttpClient` implementation for `HyperClient<C>` with custom connectors beyond `HttpConnector`, enabling Unix Domain Socket connections and other custom transports
67

78
## 0.30.0
89

opentelemetry-http/src/lib.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,11 @@ pub mod hyper {
179179
}
180180

181181
#[async_trait]
182-
impl HttpClient for HyperClient {
182+
impl<C> HttpClient for HyperClient<C>
183+
where
184+
C: Connect + Clone + Send + Sync + 'static,
185+
HyperClient<C>: Debug,
186+
{
183187
async fn send_bytes(&self, request: Request<Bytes>) -> Result<Response<Bytes>, HttpError> {
184188
otel_debug!(name: "HyperClient.Send");
185189
let (parts, body) = request.into_parts();

0 commit comments

Comments
 (0)