From cd46526e977304e62eca1e586cc26557ead30b41 Mon Sep 17 00:00:00 2001 From: Victor Michel Date: Thu, 23 May 2024 12:20:26 +0200 Subject: [PATCH] Comment TraceLevelInfoFilter as it breaks OTel compatibility --- config.go | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/config.go b/config.go index 7a80724..053771a 100644 --- a/config.go +++ b/config.go @@ -41,7 +41,6 @@ import ( "github.com/segmentio/fasthash/fnv1a" "github.com/sirupsen/logrus" etcd "go.etcd.io/etcd/client/v3" - "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc" "google.golang.org/grpc" ) @@ -736,20 +735,20 @@ func GetTracingLevel() tracing.Level { // handlers to propagate trace context. // However, stats handlers do not have a filter feature. // See: https://github.com/open-telemetry/opentelemetry-go-contrib/issues/4575 -var TraceLevelInfoFilter = otelgrpc.Filter(func(info *otelgrpc.InterceptorInfo) bool { - if info.UnaryServerInfo != nil { - if info.UnaryServerInfo.FullMethod == "/pb.gubernator.PeersV1/GetPeerRateLimits" { - return false - } - if info.UnaryServerInfo.FullMethod == "/pb.gubernator.V1/HealthCheck" { - return false - } - } - if info.Method == "/pb.gubernator.PeersV1/GetPeerRateLimits" { - return false - } - if info.Method == "/pb.gubernator.V1/HealthCheck" { - return false - } - return true -}) +// var TraceLevelInfoFilter = otelgrpc.Filter(func(info *otelgrpc.InterceptorInfo) bool { +// if info.UnaryServerInfo != nil { +// if info.UnaryServerInfo.FullMethod == "/pb.gubernator.PeersV1/GetPeerRateLimits" { +// return false +// } +// if info.UnaryServerInfo.FullMethod == "/pb.gubernator.V1/HealthCheck" { +// return false +// } +// } +// if info.Method == "/pb.gubernator.PeersV1/GetPeerRateLimits" { +// return false +// } +// if info.Method == "/pb.gubernator.V1/HealthCheck" { +// return false +// } +// return true +// })