EricksonLopez.Resilience

dotnet-resilience · Reliability & Concurrency

On this page (20 sections)

1. Identity, Tier & Maturity Profile#

L2 Cross-Cutting & ReliabilityStableMaintenance: ActiveAOT: FullMIT LicenseConfidence: HIGH
Cross-CuttingInfrastructurenet8.0net9.0net10.0

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
Also published in this family:
EricksonLopez.Resilience.AbstractionsEricksonLopez.Resilience.OpenTelemetryEricksonLopez.Resilience.PollyEricksonLopez.Resilience.DependencyInjectionEricksonLopez.Resilience.AspNetCoreEricksonLopez.Resilience.Mediator

4. Verified Ecosystem Metrics#

v2.0.0
NuGet Published Version
v3.0.0
Repo HEAD Version
5,384
NuGet Downloads
7
Packable Packages
343
Public API Members
0
Benchmark Rows (RyuJIT)

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 IDStatusNuGet / LocalTFMsAOT StatusDownloadsDescription
EricksonLopez.ResiliencePrimaryPublishedv2.0.0 / v3.0.0net8.0, net9.0, net10.0AOT: Full1,105Core resilience pipeline builders, strategy registries, transient error classifiers, and Result integration for the EricksonLopez ecosystem.
EricksonLopez.Resilience.AbstractionsPublishedv2.0.0 / v3.0.0net8.0, net9.0, net10.0AOT: Full1,195Core resilience abstractions, contracts, context, strategy options, and classification models for the EricksonLopez ecosystem.
EricksonLopez.Resilience.OpenTelemetryPublishedv2.0.0 / v3.0.0net8.0, net9.0, net10.0AOT: Full1,097OpenTelemetry metrics and distributed tracing instrumentation for EricksonLopez.Resilience.
EricksonLopez.Resilience.PollyPublishedv2.0.0 / v3.0.0net8.0, net9.0, net10.0AOT: Full1,070Polly v8 infrastructure adapter for EricksonLopez.Resilience, encapsulating ResiliencePipeline execution behind ecosystem abstractions.
EricksonLopez.Resilience.DependencyInjectionPublishedv2.0.0 / v3.0.0net8.0, net9.0, net10.0AOT: Full343Dependency injection extensions and configuration registration for EricksonLopez.Resilience.
EricksonLopez.Resilience.AspNetCorePublishedv2.0.0 / v3.0.0net8.0, net9.0, net10.0AOT: Full292ASP.NET Core and HttpClient resilience handler integration for the EricksonLopez ecosystem.
EricksonLopez.Resilience.MediatorPublishedv2.0.0 / v3.0.0net8.0, net9.0, net10.0AOT: Full282EricksonLopez.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#

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
EricksonLopez.Resilience Dependency Topology2 upstream library dependencies and 1 downstream dependent libraries verified in dependencies.json.
View accessible text summary and structure

2 upstream library dependencies and 1 downstream dependent libraries verified in dependencies.json.

DirectionLibraryTierRelationship Kinds
UpstreamEricksonLopez.ResultL0Adapter, NuGet Package
UpstreamEricksonLopez.MediatorL2Adapter, NuGet Package
DownstreamEricksonLopez.DapperExtensionsL3Adapter, 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_resilience

10. Target Frameworks & Native AOT / Trimming Matrix#

MSBuild `.csproj` inspection across 7 packages: 7 Full, 0 Partial, 0 Incompatible, 0 NotApplicable (analyzers/generators).

Package IDIsAotCompatibleEnableTrimAnalyzerVerified AOT StatusTarget Frameworks
EricksonLopez.ResiliencetruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.Resilience.AbstractionstruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.Resilience.OpenTelemetrytruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.Resilience.PollytruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.Resilience.DependencyInjectiontruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.Resilience.AspNetCoretruetrueFullnet8.0, net9.0, net10.0
EricksonLopez.Resilience.MediatortruetrueFullnet8.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

Verified External NuGet Dependencies (8)

Microsoft.Extensions.Configuration.AbstractionsMicrosoft.Extensions.DependencyInjection.AbstractionsMicrosoft.Extensions.Logging.AbstractionsMicrosoft.Extensions.OptionsOpenTelemetry.ApiPolly.CorePolly.RateLimitingSystem.Threading.RateLimiting

13. Configuration & DI Registration Summary#

Verified DI & Configuration Entry Points

  • IResiliencePipelineBuilder.AddCircuitBreaker

    Adds a circuit breaker strategy to the pipeline configured via an action delegate.

  • IResiliencePipelineBuilder.AddHedging

    Adds a hedging strategy to the pipeline configured via an action delegate.

  • IResiliencePipelineBuilder.AddRateLimiter

    Adds a rate limiter strategy to the pipeline configured via an action delegate.

  • IResiliencePipelineBuilder.AddRetry

    Adds a retry strategy to the pipeline configured via an action delegate.

  • IResiliencePipelineBuilder.AddTimeout

    Adds a timeout strategy to the pipeline configured via an action delegate.

  • AspNetCoreResilienceExtensions.UseResilience

    Adds `ResilienceMiddleware` to the application request execution pipeline.

  • CircuitBreakerHealthCheckExtensions.AddCircuitBreakerCheck

    Adds a resilience circuit breaker health check to the health check builder.

  • HttpClientResilienceExtensions.AddResiliencePolicy

    Adds a `ResilienceDelegatingHandler` configured with the specified policy name to the HTTP client pipeline.

  • HttpClientResilienceExtensions.AddStandardResilienceHandler

    Adds a standard comprehensive resilience pipeline to the HTTP client comprising total timeout, retry with exponential jitter, circuit breaker, and rate limiting.

  • ResiliencePipelineBuilder.AddCircuitBreaker

    Adds a circuit breaker strategy to the pipeline.

  • ResiliencePipelineBuilder.AddHedging

    Adds a hedging strategy to the pipeline.

  • ResiliencePipelineBuilder.AddRateLimiter

    Adds 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.

VersionSourcePublished DateSummary
v2.0.0 ↗nuget2026-09-25Published EricksonLopez.Resilience 2.0.0 to NuGet.org.
v2.0.0 ↗github2026-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 ↗github2026-08-29Ecosystem 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 ↗nuget2026-08-29Published EricksonLopez.Resilience 1.0.0 to NuGet.org.

Libraries in the same tier, architectural layer, or directly paired via dependency edges.

17. Documentation, API Reference & Portal Links#

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).

Search EricksonLopez.* Ecosystem

Type a library name, NuGet package ID, .NET type, or architectural concept to search across the portal.