NResilience.Extensions
0.32.0
dotnet add package NResilience.Extensions --version 0.32.0
NuGet\Install-Package NResilience.Extensions -Version 0.32.0
<PackageReference Include="NResilience.Extensions" Version="0.32.0" />
<PackageVersion Include="NResilience.Extensions" Version="0.32.0" />
<PackageReference Include="NResilience.Extensions" />
paket add NResilience.Extensions --version 0.32.0
#r "nuget: NResilience.Extensions, 0.32.0"
#:package NResilience.Extensions@0.32.0
#addin nuget:?package=NResilience.Extensions&version=0.32.0
#tool nuget:?package=NResilience.Extensions&version=0.32.0
NResilience.Extensions
Dependency injection, configuration binding, rate and concurrency limiting, and OpenTelemetry-shaped telemetry for NResilience.
Install
Install the package using the .NET CLI:
dotnet add package NResilience.Extensions
What it adds
The extensions package provides the following features:
AddResilience()onIHttpClientFactory- the one line most apps need. Adds the resilience handler, stopsHttpClient.Timeoutcompeting with the policy deadline, names the policy after the client, and attaches the telemetry meter and log listener.- Named policies - define a dependency's resilience requirements once, resolve them by name from
IResiliencePoliciesanywhere in the app. - Configuration binding with hot reload - bind a
Resiliencevalue fromIConfiguration. A reload is a reference swap, not a rebuild, so breaker and budget state survive. - Rate and concurrency limiting -
System.Threading.RateLimiting-backed limiters that compose with the executor. - Telemetry - OpenTelemetry-shaped metrics and traces, plus
ILoggerstructured logs with per-policy filtering.
Quick start
Use the following examples to get started:
// The one line most people need. The handler is added, the transport timeout stops
// competing with the deadline, and the client is instrumented.
services.AddHttpClient<OrdersClient>().AddResilience();
// Or with a policy of your own, or a registered one by name.
services.AddHttpClient("reports").AddResilience(Resilience.Http with { Attempts = 5 });
services.AddHttpClient("payments").AddResilience("api", o => o.RetryUnsafeMethods = false);
Documentation
For more information, see the following resources:
- Dependency injection -
AddResilience, named policies, hot reload, state persistence. - Configuration - the bindable shape and JSON limitations.
- Telemetry - which metrics are on by default and how to manage them.
- Logging - what a registered policy writes through
ILoggerand how to filter it.
Feedback
Provide feedback using these channels:
- Usage questions
- Bug reports and feature requests
- Security vulnerabilities - private advisory, not a public issue.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Microsoft.Extensions.Configuration (>= 10.0.11)
- Microsoft.Extensions.DependencyInjection (>= 10.0.11)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.11)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 10.0.11)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.11)
- Microsoft.Extensions.Http (>= 10.0.11)
- Microsoft.Extensions.Logging (>= 10.0.11)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.11)
- Microsoft.Extensions.Options (>= 10.0.11)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.11)
- NResilience (>= 0.32.0)
- System.Threading.RateLimiting (>= 10.0.11)
-
net8.0
- Microsoft.Extensions.Configuration (>= 10.0.11)
- Microsoft.Extensions.DependencyInjection (>= 10.0.11)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.11)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 10.0.11)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.11)
- Microsoft.Extensions.Http (>= 10.0.11)
- Microsoft.Extensions.Logging (>= 10.0.11)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.11)
- Microsoft.Extensions.Options (>= 10.0.11)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.11)
- NResilience (>= 0.32.0)
- System.Threading.RateLimiting (>= 10.0.11)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on NResilience.Extensions:
| Package | Downloads |
|---|---|
|
NResilience.Grpc
The gRPC integration for NResilience: a client interceptor that runs a resilience policy around each call, classifies gRPC status codes, writes a per-attempt deadline the peer can read, scopes breakers and budgets per service, and reports nested retries. Retrying a gRPC client through the HTTP handler does nothing - every gRPC call is a POST - which is what this package exists to fix. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.32.0 | 115 | 9/10/2026 |
| 0.31.0 | 117 | 9/9/2026 |
| 0.30.0 | 110 | 9/9/2026 |
| 0.29.0 | 121 | 9/9/2026 |
| 0.28.0 | 114 | 9/9/2026 |
| 0.27.0 | 114 | 9/9/2026 |
| 0.26.0 | 119 | 9/8/2026 |
| 0.25.0 | 113 | 9/8/2026 |
| 0.24.0 | 110 | 9/8/2026 |
| 0.23.0 | 132 | 9/5/2026 |
| 0.22.0 | 122 | 9/5/2026 |
| 0.21.0 | 122 | 9/3/2026 |
| 0.20.0 | 100 | 9/3/2026 |
| 0.19.0 | 98 | 9/3/2026 |
| 0.18.0 | 98 | 9/1/2026 |
| 0.17.0 | 97 | 9/1/2026 |
| 0.16.0 | 95 | 9/1/2026 |
| 0.15.0 | 97 | 9/1/2026 |
| 0.14.0 | 201 | 8/30/2026 |
| 0.13.0 | 112 | 8/28/2026 |