Skip to content

Commit

Permalink
fix: Implement tower::Service for OtelGrpcService (#201)
Browse files Browse the repository at this point in the history
Co-authored-by: Tim Vermeulen <tim@bitonic.nl>
  • Loading branch information
timvermeulen and Tim Vermeulen authored Jan 7, 2025
1 parent b0ead85 commit ec74474
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tonic-tracing-opentelemetry/src/middleware/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use std::{
task::{Context, Poll},
};
use tonic::client::GrpcService;
use tower::Layer;
use tower::{Layer, Service};
use tracing::Span;
use tracing_opentelemetry_instrumentation_sdk::{find_context_from_tracing, http as otel_http};

Expand All @@ -34,7 +34,7 @@ pub struct OtelGrpcService<S> {
inner: S,
}

impl<S, B, B2> GrpcService<B> for OtelGrpcService<S>
impl<S, B, B2> Service<Request<B>> for OtelGrpcService<S>
where
S: GrpcService<B, ResponseBody = B2> + Clone + Send + 'static,
S::Future: Send + 'static,
Expand All @@ -43,7 +43,7 @@ where
// B2: tonic::codegen::Body,
B2: http_body::Body,
{
type ResponseBody = B2;
type Response = Response<B2>;
type Error = S::Error;
type Future = ResponseFuture<S::Future>;
// #[allow(clippy::type_complexity)]
Expand Down

0 comments on commit ec74474

Please sign in to comment.