Description
The HTTP resiliency features, including those added by the IHttpClientBuilder.AddStandardResilienceHandler
method, don't apply to gRPC calls despite them going through configured HttpClient
instances. This is due to the gRPC stack not exposing error details at the HTTP request level in the way that the resiliency features expect (e.g. using HTTP status codes).
The following code example, typical of setting up a gRPC client in a .NET server application, will not actually result in the standard resiliency features being applied to gRPC calls:
builder.Services.AddGrpcClient<Basket.BasketClient>(o => o.Address = new("http://basket-api"))
.AddStandardResilienceHandler();
Consider adding support for the standard resiliency patterns to the .NET gRPC client stack in a similar fashion to those added to the HttpClient
stack so that resiliency features like Circuit Breaker can be easily added by default.
/Cc @JamesNK @davidfowl