Skip to content

Commit

Permalink
Merge pull request #21 from vikmik/master
Browse files Browse the repository at this point in the history
Comment TraceLevelInfoFilter as it breaks OTel compatibility
  • Loading branch information
thrawn01 authored May 25, 2024
2 parents e054be3 + cd46526 commit 1cafc99
Showing 1 changed file with 17 additions and 18 deletions.
35 changes: 17 additions & 18 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down Expand Up @@ -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
// })

0 comments on commit 1cafc99

Please sign in to comment.