package filters
import "go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc/filters"
Package filters provides a set of filters useful with the otelgrpc.WithFilter option to control which inbound requests are instrumented.
Index ¶
- func All(fs ...otelgrpc.Filter) otelgrpc.Filter
- func Any(fs ...otelgrpc.Filter) otelgrpc.Filter
- func FullMethodName(n string) otelgrpc.Filter
- func HealthCheck() otelgrpc.Filter
- func MethodName(n string) otelgrpc.Filter
- func MethodPrefix(pre string) otelgrpc.Filter
- func None(fs ...otelgrpc.Filter) otelgrpc.Filter
- func Not(f otelgrpc.Filter) otelgrpc.Filter
- func ServiceName(s string) otelgrpc.Filter
- func ServicePrefix(pre string) otelgrpc.Filter
Functions ¶
func All ¶
All takes a list of Filters and returns a Filter that returns true only if all Filters in the list return true.
func Any ¶
Any takes a list of Filters and returns a Filter that returns true if any Filter in the list returns true.
func FullMethodName ¶
FullMethodName returns a Filter that returns true if the request's full RPC method string, i.e. /package.service/method, starts with the provided string n.
func HealthCheck ¶
HealthCheck returns a Filter that returns true if the request's service name is health check defined by gRPC Health Checking Protocol. https://github.com/grpc/grpc/blob/master/doc/health-checking.md
func MethodName ¶
MethodName returns a Filter that returns true if the request's method name matches the provided string n.
func MethodPrefix ¶
MethodPrefix returns a Filter that returns true if the request's method starts with the provided string pre.
func None ¶
None takes a list of Filters and returns a Filter that returns true only if none of the Filters in the list return true.
func Not ¶
Not provides a convenience mechanism for inverting a Filter.
func ServiceName ¶
ServiceName returns a Filter that returns true if the request's service name, i.e. package.service, matches s.
func ServicePrefix ¶
ServicePrefix returns a Filter that returns true if the request's service name, i.e. package.service, starts with the provided string pre.
Source Files ¶
filters.go
Directories ¶
Path | Synopsis |
---|---|
filters/interceptor | Package interceptor provides a set of filters useful with the otelgrpc.WithInterceptorFilter option to control which inbound requests are instrumented. |
- Version
- v0.60.0 (latest)
- Published
- Mar 6, 2025
- Platform
- linux/amd64
- Imports
- 4 packages
- Last checked
- 5 days ago –
Tools for package owners.