Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comment TraceLevelInfoFilter as it breaks OTel compatibility #21

Merged
merged 1 commit into from
May 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
// })
Loading