Merge pull request #13607 from Jille/log-method

client: retry_interceptor.go: Log the method that failed
This commit is contained in:
Piotr Tabor
2022-01-16 17:02:29 +01:00
committed by GitHub

View File

@@ -54,6 +54,7 @@ func (c *Client) unaryClientInterceptor(optFuncs ...retryOption) grpc.UnaryClien
c.GetLogger().Debug(
"retrying of unary invoker",
zap.String("target", cc.Target()),
zap.String("method", method),
zap.Uint("attempt", attempt),
)
lastErr = invoker(ctx, method, req, reply, cc, grpcOpts...)
@@ -63,6 +64,7 @@ func (c *Client) unaryClientInterceptor(optFuncs ...retryOption) grpc.UnaryClien
c.GetLogger().Warn(
"retrying of unary invoker failed",
zap.String("target", cc.Target()),
zap.String("method", method),
zap.Uint("attempt", attempt),
zap.Error(lastErr),
)