go-grpc-middleware
go-grpc-middleware copied to clipboard
Golang gRPC Middlewares: interceptor chaining, auth, logging, retries and more.
Current Client-side Stream Interceptor implementation is bugged - it assumes that if the RPC is streaming, then the Server must be streaming responses too. This is incorrect, as a Streaming...
Hi, is there a plan for supporting retry middleware with minimum retry wait duration. For example, when the server return RetryDelay struct [RetryInfo](https://pkg.go.dev/google.golang.org/genproto/googleapis/rpc/errdetails#RetryInfo) the client can use this information to...
Add two labels grpc_server_ip and grpc_client_ip to the server metrics when option WithServerIPLabelsEnabled() is set. These labels are not added by default for compatibility. This pr proposes an implementation for...
**Go version used**: n/a **What happened**: https://github.com/grpc-ecosystem/go-grpc-middleware/actions/runs/12800384294/job/35688069659 ``` Run make lint make lint shell: /usr/bin/bash -e {0} env: GOROOT: /opt/hostedtoolcache/go/1.21.13/x64 (re)installing /home/runner/go/bin/buf-v1.26.1 go: downloading github.com/bufbuild/buf v1.26.1 ... (re)installing /home/runner/go/bin/goimports-v0.7.0 ......
After otelgrpc.StreamClientInterceptor() was deprecated, it is recommended to replace it with otelgrpc.NewClientHandler(). However, the execution order is different: interceptors run first, followed by StatsHandlers. From the code, this seems to...
The current implementation is not compatible with the std library `log/slog` package https://github.com/grpc-ecosystem/go-grpc-middleware/blob/main/interceptors/logging/logging.go#L188-L196 The compiler error is ``` have Log(context.Context, slog.Level, string, ...any) want Log(context.Context, logging.Level, string, ...any) ``` **Go...
Hi, Is it possible add AttemptMetadataKey = "x-retry-attempt" https://github.com/grpc-ecosystem/go-grpc-middleware/blob/main/interceptors/retry/retry.go#L22 in StreamClientInterceptor ? exactly the same way it works in UnaryClientInterceptor thank you