Created
November 13, 2022 00:13
-
-
Save theothertomelliott/8e0f6df45206e93deb36cdbdd49b66d5 to your computer and use it in GitHub Desktop.
How to filter gRPC health checks from opentelemetry incerceptors
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc" | |
import "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/filters" | |
// ... | |
grpc.UnaryInterceptor( | |
otelgrpc.UnaryServerInterceptor( | |
otelgrpc.WithInterceptorFilter( | |
filters.Not( | |
filters.HealthCheck(), | |
), | |
), | |
), | |
), |
Thanks for this!
Any idea how to do this now that
otelgrpc.UnaryServerInterceptor
is deprecated?
Looks like there isn't an alternative yet. See open-telemetry/opentelemetry-go-contrib#4575
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for this!
Any idea how to do this now that
otelgrpc.UnaryServerInterceptor
is deprecated?