EricksonLopez.Resilience
dotnet-resilience · Reliability & Concurrency
On this page (20 sections)
1. Identity, Tier & Maturity Profile#
2. Value Proposition & Problem Solved#
Enterprise-grade Clean Architecture resilience & fault-tolerance framework for modern .NET (8/9/10). Native AOT-compatible, Polly v8 isolation, Result (ROP) error classification, and OpenTelemetry observability.
Direct Polly usage leaks third-party types into Domain/Application layers, ignores functional Result<T> transient failures, and risks retrying over poisoned transactions.
3. Quick Install#
Primary package: EricksonLopez.Resilience
dotnet add package EricksonLopez.Resilience --version 2.0.0<PackageReference Include="EricksonLopez.Resilience" Version="2.0.0" /><PackageVersion Include="EricksonLopez.Resilience" Version="2.0.0" />4. Verified Ecosystem Metrics#
Snapshot retrieved UTC: 2026-12-01
5. When to Use & When Not to Use#
When to use
- You need Clean Architecture resilience pipelines wrapping Polly v8 with Result<T> error classification and OpenTelemetry metrics.
When NOT to use
- You only need simple HTTP timeout configuration without retry/circuit-breaker classification.
6. Core Capabilities & Design Invariants#
Polly v8 Isolation & Result Classification
Evaluates both CLR exceptions and Error.Retryability via ResultRetryClassifier without leaking Polly types.
Full Native AOT Compliance
All 7 packages set IsAotCompatible=true and EnableTrimAnalyzer=true with HttpClient, ASP.NET Core, and Mediator integrations.
7. Included NuGet Packages & Adapters#
| Package ID | Status | NuGet / Local | TFMs | AOT Status | Downloads | Description |
|---|---|---|---|---|---|---|
| EricksonLopez.ResiliencePrimary | Published | v2.0.0 / v3.0.0 | net8.0, net9.0, net10.0 | AOT: Full | 1,105 | Core resilience pipeline builders, strategy registries, transient error classifiers, and Result integration for the EricksonLopez ecosystem. |
| EricksonLopez.Resilience.Abstractions | Published | v2.0.0 / v3.0.0 | net8.0, net9.0, net10.0 | AOT: Full | 1,195 | Core resilience abstractions, contracts, context, strategy options, and classification models for the EricksonLopez ecosystem. |
| EricksonLopez.Resilience.OpenTelemetry | Published | v2.0.0 / v3.0.0 | net8.0, net9.0, net10.0 | AOT: Full | 1,097 | OpenTelemetry metrics and distributed tracing instrumentation for EricksonLopez.Resilience. |
| EricksonLopez.Resilience.Polly | Published | v2.0.0 / v3.0.0 | net8.0, net9.0, net10.0 | AOT: Full | 1,070 | Polly v8 infrastructure adapter for EricksonLopez.Resilience, encapsulating ResiliencePipeline execution behind ecosystem abstractions. |
| EricksonLopez.Resilience.DependencyInjection | Published | v2.0.0 / v3.0.0 | net8.0, net9.0, net10.0 | AOT: Full | 343 | Dependency injection extensions and configuration registration for EricksonLopez.Resilience. |
| EricksonLopez.Resilience.AspNetCore | Published | v2.0.0 / v3.0.0 | net8.0, net9.0, net10.0 | AOT: Full | 292 | ASP.NET Core and HttpClient resilience handler integration for the EricksonLopez ecosystem. |
| EricksonLopez.Resilience.Mediator | Published | v2.0.0 / v3.0.0 | net8.0, net9.0, net10.0 | AOT: Full | 282 | EricksonLopez.Mediator pipeline behavior integration for resilient request handling with zero-allocation continuations. |
8. Quick Start Code Example#
Grounded in verified public APIs from EricksonLopez.Resilience. Compile with `<ImplicitUsings>disable</ImplicitUsings>` and explicit imports.
using System;
using EricksonLopez.Resilience.DependencyInjection;
using EricksonLopez.Resilience.Extensions;
using EricksonLopez.Resilience.Options;
using Microsoft.Extensions.DependencyInjection;
var services = new ServiceCollection();
services.AddEricksonLopezResilience(options =>
{
options.AddPolicy("payment-gateway-policy", builder =>
{
builder
.AddTimeout(TimeSpan.FromSeconds(5))
.AddResultRetry(opt =>
{
opt.MaxRetryAttempts = 3;
opt.Delay = TimeSpan.FromMilliseconds(150);
opt.BackoffType = BackoffType.ExponentialWithJitter;
});
});
});9. Architecture & Dependency Flow#
Rendering diagram…
flowchart LR lib_resilience["EricksonLopez.Resilience (L2)"] lib_result["EricksonLopez.Result (L0)"] lib_resilience -.-> lib_result lib_mediator["EricksonLopez.Mediator (L2)"] lib_resilience -.-> lib_mediator lib_dapper_extensions["EricksonLopez.DapperExtensions (L3)"] lib_dapper_extensions -.-> lib_resilience
View accessible text summary and structure
2 upstream library dependencies and 1 downstream dependent libraries verified in dependencies.json.
| Direction | Library | Tier | Relationship Kinds |
|---|---|---|---|
| Upstream | EricksonLopez.Result | L0 | Adapter, NuGet Package |
| Upstream | EricksonLopez.Mediator | L2 | Adapter, NuGet Package |
| Downstream | EricksonLopez.DapperExtensions | L3 | Adapter, NuGet Package |
flowchart LR
lib_resilience["EricksonLopez.Resilience (L2)"]
lib_result["EricksonLopez.Result (L0)"]
lib_resilience -.-> lib_result
lib_mediator["EricksonLopez.Mediator (L2)"]
lib_resilience -.-> lib_mediator
lib_dapper_extensions["EricksonLopez.DapperExtensions (L3)"]
lib_dapper_extensions -.-> lib_resilience10. Target Frameworks & Native AOT / Trimming Matrix#
MSBuild `.csproj` inspection across 7 packages: 7 Full, 0 Partial, 0 Incompatible, 0 NotApplicable (analyzers/generators).
| Package ID | IsAotCompatible | EnableTrimAnalyzer | Verified AOT Status | Target Frameworks |
|---|---|---|---|---|
| EricksonLopez.Resilience | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.Resilience.Abstractions | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.Resilience.OpenTelemetry | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.Resilience.Polly | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.Resilience.DependencyInjection | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.Resilience.AspNetCore | true | true | Full | net8.0, net9.0, net10.0 |
| EricksonLopez.Resilience.Mediator | true | true | Full | net8.0, net9.0, net10.0 |
11. Upstream Dependencies & Downstream Dependents#
Upstream Dependencies (2)
Downstream Dependents (1)
12. Optional Adapters & Third-Party Integrations#
Internal Adapter Edges & Integration Packages
- EricksonLopez.DapperExtensions→ EricksonLopez.Resilience.Abstractions
- EricksonLopez.DapperExtensions→ EricksonLopez.Resilience.Polly
- EricksonLopez.Resilience→ EricksonLopez.Result (EricksonLopez.Result)
- EricksonLopez.Resilience.Mediator→ EricksonLopez.Mediator (EricksonLopez.Mediator)
Verified External NuGet Dependencies (8)
13. Configuration & DI Registration Summary#
Verified DI & Configuration Entry Points
IResiliencePipelineBuilder.AddCircuitBreakerAdds a circuit breaker strategy to the pipeline configured via an action delegate.
IResiliencePipelineBuilder.AddHedgingAdds a hedging strategy to the pipeline configured via an action delegate.
IResiliencePipelineBuilder.AddRateLimiterAdds a rate limiter strategy to the pipeline configured via an action delegate.
IResiliencePipelineBuilder.AddRetryAdds a retry strategy to the pipeline configured via an action delegate.
IResiliencePipelineBuilder.AddTimeoutAdds a timeout strategy to the pipeline configured via an action delegate.
AspNetCoreResilienceExtensions.UseResilienceAdds `ResilienceMiddleware` to the application request execution pipeline.
CircuitBreakerHealthCheckExtensions.AddCircuitBreakerCheckAdds a resilience circuit breaker health check to the health check builder.
HttpClientResilienceExtensions.AddResiliencePolicyAdds a `ResilienceDelegatingHandler` configured with the specified policy name to the HTTP client pipeline.
HttpClientResilienceExtensions.AddStandardResilienceHandlerAdds a standard comprehensive resilience pipeline to the HTTP client comprising total timeout, retry with exponential jitter, circuit breaker, and rate limiting.
ResiliencePipelineBuilder.AddCircuitBreakerAdds a circuit breaker strategy to the pipeline.
ResiliencePipelineBuilder.AddHedgingAdds a hedging strategy to the pipeline.
ResiliencePipelineBuilder.AddRateLimiterAdds a rate limiter strategy to the pipeline.
Key Public Types & Contracts
EricksonLopez.Resilience.IResilienceExecutor (interface)Defines the primary resilience execution facade for the EricksonLopez ecosystem.
EricksonLopez.Resilience.IResiliencePipeline (interface)Defines a resilience execution pipeline capable of executing asynchronous delegates with fault-tolerance strategies and managing the deterministic lifecycle disposal of underlying strategy resources.
EricksonLopez.Resilience.IResiliencePipelineBuilder (interface)Defines a builder for configuring and assembling resilience strategies into an executable pipeline.
EricksonLopez.Resilience.IResiliencePipelineRegistry (interface)Defines a registry for storing and retrieving configured resilience pipelines by their unique names.
EricksonLopez.Resilience.IResiliencePipeline`1 (interface)Defines a strongly-typed resilience execution pipeline capable of executing asynchronous delegates returning `TResult` with fault-tolerance strategies and managing the deterministic lifecycle disposal of underlying strategy resources.
EricksonLopez.Resilience.ResilienceContext (class)Represents the execution context for a resilient operation within the EricksonLopez ecosystem.
EricksonLopez.Resilience.ResilienceExecutionContextScope (class)Provides an ambient execution context scope that bridges `CancellationToken` instances across asynchronous execution boundaries where interface signatures cannot directly pass a cancellation token.
EricksonLopez.Resilience.ResilienceExecutionContextScope.TokenScope (struct)Manages the lifetime of an ambient cancellation token scope as a lightweight stack-allocated struct. Restores the previous ambient token when disposed without allocating heap memory.
EricksonLopez.Resilience.AspNetCore.Extensions.AspNetCoreResilienceExtensions (class)Provides extension methods for attaching resilience metadata and filters to ASP.NET Core endpoint builders and applications.
EricksonLopez.Resilience.AspNetCore.Extensions.CircuitBreakerHealthCheckExtensions (class)Provides extension methods for registering resilience circuit breaker health checks in ASP.NET Core applications.
EricksonLopez.Resilience.AspNetCore.Extensions.HttpClientResilienceExtensions (class)Provides extension methods for configuring resilience policies on named and typed `Http.HttpClient` instances.
EricksonLopez.Resilience.AspNetCore.Filters.ResilienceEndpointFilter (class)Executes HTTP endpoints within a configured resilience policy as an endpoint filter.
14. Verified Performance Benchmarks#
All verified measurements below come strictly from `BenchmarkDotNet.Artifacts` running on .NET RyuJIT (0 NativeAOT benchmark runs exist in this snapshot).
No non-MEGA-AUDIT `BenchmarkDotNet.Artifacts` files were verified for this library in the snapshot (`hasBenchmarks: false`).
15. Release History & NuGet vs Repo Status#
Version lag detected: NuGet.org latest published version is v2.0.0, while local repository HEAD is at v3.0.0.
| Version | Source | Published Date | Summary |
|---|---|---|---|
| v2.0.0 ↗ | nuget | 2026-09-25 | Published EricksonLopez.Resilience 2.0.0 to NuGet.org. |
| v2.0.0 ↗ | github | 2026-09-25 | [2.0.0](https://github.com/ericksonlopezf/dotnet-resilience/compare/v1.0.0...v2.0.0) (2026-09-25) ⚠ BREAKING CHANGES * enforce strict pipeline validation, health checks, and governance hardening * enforce strict pipeline validation, health checks, and governance hardening ✨ Features * enforce strict pipeline validation, health checks, and governance hardening ([e5bfe04](https://github.com/erick... |
| v1.0.0 ↗ | github | 2026-08-29 | Ecosystem Packages in this release | Package | Version | |---------|---------| | `EricksonLopez.Resilience.Abstractions` | `1.0.0` | | `EricksonLopez.Resilience` | `1.0.0` | | `EricksonLopez.Resilience.AspNetCore` | `1.0.0` | | `EricksonLopez.Resilience.DependencyInjection` | `1.0.0` | | `EricksonLopez.Resilience.Mediator` | `1.0.0` | | `EricksonLopez.Resilience.OpenTelemetry` | `1.0.0` | | `Er... |
| v1.0.0 ↗ | nuget | 2026-08-29 | Published EricksonLopez.Resilience 1.0.0 to NuGet.org. |
16. Complementary & Related Libraries#
Libraries in the same tier, architectural layer, or directly paired via dependency edges.
17. Documentation, API Reference & Portal Links#
Conceptual Documentation (Starlight) →
Extracted XML API Reference →
24 namespaces · 73 types · 343 members
Ecosystem Dependency Map →
Learning Center & Handbook →
Per-library conceptual Starlight pages expand in M4; API Reference pages expand in M3.2.
18. Source Repository, License & Contributing#
Released under the MIT License. All assemblies follow EricksonLopez.* build invariants: explicit imports, strong-name signing (`EricksonLopez.snk`), and ASCII author metadata (`Erickson Lopez`).
19. Troubleshooting, Pitfalls & Migration Guidance#
- Keep retries outside ambient database transactions or reset unit-of-work state cleanly to avoid SQLSTATE 25P02 aborted transaction errors.
- Version lag detected: NuGet.org latest published version is v2.0.0, while local repository HEAD is at v3.0.0.
20. Quality & Verification Evidence#
- Strong-Name Signing (`EricksonLopez.snk`)
- EricksonLopez.snk
- `ImplicitUsings=disable`
- disable
- XML Documentation Extraction
- Verified (24 namespaces, 73 types, 343 members)
- MSBuild AOT / Trim Attributes
- 7 Full / 0 Partial / 0 Incompatible / 0 N/A
- BenchmarkDotNet Artifacts
- 0 total (0 measured, 0 na_error)
Explicit Verification Boundaries & Limitations
- All verified measurements below come strictly from `BenchmarkDotNet.Artifacts` running on .NET RyuJIT (0 NativeAOT benchmark runs exist in this snapshot).