Skip to content

Commit c363da8

Browse files
committed
feat!: export grpc utils from http::grpc module
instead of `tools`, `grpc_client`, `grpc_server` FIX #265
1 parent b8b3c3b commit c363da8

File tree

5 files changed

+3
-6
lines changed

5 files changed

+3
-6
lines changed

tonic-tracing-opentelemetry/src/middleware/client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ where
9797
let this = self.project();
9898
let _guard = this.span.enter();
9999
let result = futures_util::ready!(this.inner.poll(cx));
100-
otel_http::grpc_client::update_span_from_response_or_error(this.span, &result);
100+
otel_http::grpc::update_span_from_response_or_error(this.span, &result);
101101
Poll::Ready(result)
102102
}
103103
}

tonic-tracing-opentelemetry/src/middleware/server.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ where
122122
let this = self.project();
123123
let _guard = this.span.enter();
124124
let result = futures_util::ready!(this.inner.poll(cx));
125-
otel_http::grpc_server::update_span_from_response_or_error(this.span, &result);
125+
otel_http::grpc::update_span_from_response_or_error(this.span, &result);
126126
Poll::Ready(result)
127127
}
128128
}
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
use super::grpc;
22

3-
pub use grpc::update_span_from_response_or_error;
4-
53
pub fn make_span_from_request<B>(req: &http::Request<B>) -> tracing::Span {
64
grpc::make_span_from_request(req, opentelemetry::trace::SpanKind::Client)
75
}

tracing-opentelemetry-instrumentation-sdk/src/http/grpc_server.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use super::grpc;
2-
pub use grpc::update_span_from_response_or_error;
32

43
pub fn make_span_from_request<B>(req: &http::Request<B>) -> tracing::Span {
54
grpc::make_span_from_request(req, opentelemetry::trace::SpanKind::Server)

tracing-opentelemetry-instrumentation-sdk/src/http/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
mod grpc;
1+
pub mod grpc;
22
pub mod grpc_client;
33
pub mod grpc_server;
44
pub mod http_server;

0 commit comments

Comments
 (0)