aboutsummaryrefslogtreecommitdiffstats
path: root/crates/router/src/processor/grpc.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/router/src/processor/grpc.rs')
-rw-r--r--crates/router/src/processor/grpc.rs27
1 files changed, 0 insertions, 27 deletions
diff --git a/crates/router/src/processor/grpc.rs b/crates/router/src/processor/grpc.rs
deleted file mode 100644
index 344f2a1..0000000
--- a/crates/router/src/processor/grpc.rs
+++ /dev/null
@@ -1,27 +0,0 @@
-pub mod interceptor {
- use opentelemetry::global;
- use tonic::{
- Status,
- service::{Interceptor, interceptor::InterceptedService},
- transport::Channel,
- };
- use tracing::Span;
- use tracing_opentelemetry::OpenTelemetrySpanExt;
- use warden_stack::tracing::telemetry::tonic::injector;
-
- pub type Intercepted = InterceptedService<Channel, MyInterceptor>;
-
- #[derive(Clone, Copy)]
- pub struct MyInterceptor;
-
- impl Interceptor for MyInterceptor {
- fn call(&mut self, mut request: tonic::Request<()>) -> Result<tonic::Request<()>, Status> {
- let cx = Span::current().context();
- global::get_text_map_propagator(|propagator| {
- propagator.inject_context(&cx, &mut injector::MetadataMap(request.metadata_mut()))
- });
-
- Ok(request)
- }
- }
-}