Anarchy.Toolkit.Infrastructure.CorrelationId
1.1.1
See the version list below for details.
dotnet add package Anarchy.Toolkit.Infrastructure.CorrelationId --version 1.1.1
NuGet\Install-Package Anarchy.Toolkit.Infrastructure.CorrelationId -Version 1.1.1
<PackageReference Include="Anarchy.Toolkit.Infrastructure.CorrelationId" Version="1.1.1" />
<PackageVersion Include="Anarchy.Toolkit.Infrastructure.CorrelationId" Version="1.1.1" />
<PackageReference Include="Anarchy.Toolkit.Infrastructure.CorrelationId" />
paket add Anarchy.Toolkit.Infrastructure.CorrelationId --version 1.1.1
#r "nuget: Anarchy.Toolkit.Infrastructure.CorrelationId, 1.1.1"
#:package Anarchy.Toolkit.Infrastructure.CorrelationId@1.1.1
#addin nuget:?package=Anarchy.Toolkit.Infrastructure.CorrelationId&version=1.1.1
#tool nuget:?package=Anarchy.Toolkit.Infrastructure.CorrelationId&version=1.1.1
Anarchy.Toolkit.Infrastructure.CorrelationId
Part of Anarchy I/O Toolkit, a .NET developer platform · Pillar: Infrastructure · Layer: Infrastructure · Package catalog
Correlation and attempt ID propagation for ASP.NET Core services and Serilog.
dotnet add package Anarchy.Toolkit.Infrastructure.CorrelationId
- Access IDs through the async-local
CorrelationContext. - Add
UseCorrelationId()to the ASP.NET Core pipeline; headers default toX-Correlation-IdandX-Attempt-Idand are configurable. - Add the Serilog
WithCorrelationId()enricher and register services throughModuleCorrelationId.
When to use it
Use correlation and attempt IDs to connect log events from the same request or retry across service boundaries. The package provides inbound HTTP middleware and log enrichment; it does not automatically configure every outgoing HTTP client or message publisher to forward headers.
How to use it
- Register
ModuleCorrelationIdwith the application's configuration and environment. Pass aCorrelationIdOptionsfactory to customize header names or missing-header behavior. - Add
UseCorrelationId()early enough in the ASP.NET Core pipeline for later middleware and endpoints to see the context. - Add the Serilog
WithCorrelationId()enricher to the logger and propagate the IDs to downstream requests where required.CorrelationContextstores the current values in async-local context.
The default behavior generates missing values. IgnoreIfMissing and ThrowIfMissing are available when the application instead wants to accept missing headers or reject them. Coordinate header names with upstream and downstream services.
See the observability guide and toolkit overview.
Releases
1.1.1
- docs(packages): identify each package's pillar and layer
- build(packages): attribute the copyright to Leandro Melão Medeiros
- build: relicense under Apache-2.0 and update the package metadata
1.1.0
- build(deps): upgrade Swashbuckle.AspNetCore to 11.0.1 and Microsoft.OpenApi to 3.11.1
1.0.6
- docs: expand XML docblocks across all projects for the DocFX API reference
1.0.5
- refactor(src): clean up code style across library packages
1.0.3
- build: migrate local automation to build tooling
1.0.2
- docs: expand package guides and release histories
1.0.1
- Added a package-specific NuGet README.
1.0.0
- Introduced correlation ID context and options, HTTP header propagation middleware, Serilog enrichment and dependency-injection wiring.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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
- Anarchy.Toolkit.Core (>= 1.1.1)
- Humanizer (>= 3.0.10)
- Newtonsoft.Json (>= 13.0.4)
- Serilog (>= 4.4.0)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on Anarchy.Toolkit.Infrastructure.CorrelationId:
| Package | Downloads |
|---|---|
|
Anarchy.Toolkit.Configuration
Application configuration: settings contracts, environment and secret handling, and the provider-neutral telemetry bootstrap (ModuleTelemetry) that applications extend through dependency injection. |
|
|
Anarchy.Toolkit.Infrastructure.Messaging.Aws
AWS SNS and SQS implementations of the message-broker publisher abstraction, with the shared publisher base, request-builder base, inbound mapping, and compression. |
|
|
Anarchy.Toolkit.Hosting.Workers
Worker pipeline: monitored/resilient background workers, heartbeat, and a self-hosted health API (service health reports, build metadata) for workers. |
|
|
Anarchy.Toolkit.Infrastructure.Telemetry.Serilog
Optional Serilog integration for Anarchy telemetry: logging provider registration, console defaults for composition roots, a structured-exception enricher and opt-in log-based metrics. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Initial release.