Skip to content

Commit

Permalink
Removed config.TraceLevelInfoFilter
Browse files Browse the repository at this point in the history
  • Loading branch information
thrawn01 committed Jun 8, 2024
1 parent dc9b528 commit 2853d0f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 37 deletions.
25 changes: 0 additions & 25 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"
)

// BehaviorConfig controls the handling of rate limits in the cluster
Expand Down Expand Up @@ -742,27 +741,3 @@ func GetTracingLevel() tracing.Level {
}
return tracing.InfoLevel
}

// TraceLevelInfoFilter is used with otelgrpc.WithInterceptorFilter() to
// reduce noise by filtering trace propagation on some gRPC methods.
// otelgrpc deprecated use of interceptors in v0.45.0 in favor of stats
// 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
// })
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ require (
github.com/sirupsen/logrus v1.9.2
github.com/stretchr/testify v1.9.0
go.etcd.io/etcd/client/v3 v3.5.5
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.46.1
go.opentelemetry.io/otel v1.26.0
go.opentelemetry.io/otel/sdk v1.26.0
go.opentelemetry.io/otel/trace v1.26.0
Expand Down
11 changes: 0 additions & 11 deletions go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2853d0f

Please sign in to comment.