Anarchy.Toolkit.Infrastructure.CorrelationId 1.0.6

There is a newer version of this package available.
See the version list below for details.
dotnet add package Anarchy.Toolkit.Infrastructure.CorrelationId --version 1.0.6
                    
NuGet\Install-Package Anarchy.Toolkit.Infrastructure.CorrelationId -Version 1.0.6
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Anarchy.Toolkit.Infrastructure.CorrelationId" Version="1.0.6" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Anarchy.Toolkit.Infrastructure.CorrelationId" Version="1.0.6" />
                    
Directory.Packages.props
<PackageReference Include="Anarchy.Toolkit.Infrastructure.CorrelationId" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Anarchy.Toolkit.Infrastructure.CorrelationId --version 1.0.6
                    
#r "nuget: Anarchy.Toolkit.Infrastructure.CorrelationId, 1.0.6"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Anarchy.Toolkit.Infrastructure.CorrelationId@1.0.6
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Anarchy.Toolkit.Infrastructure.CorrelationId&version=1.0.6
                    
Install as a Cake Addin
#tool nuget:?package=Anarchy.Toolkit.Infrastructure.CorrelationId&version=1.0.6
                    
Install as a Cake Tool

Anarchy.Toolkit.Infrastructure.CorrelationId

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 to X-Correlation-Id and X-Attempt-Id and are configurable.
  • Add the Serilog WithCorrelationId() enricher and register services through ModuleCorrelationId.

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

  1. Register ModuleCorrelationId with the application's configuration and environment. Pass a CorrelationIdOptions factory to customize header names or missing-header behavior.
  2. Add UseCorrelationId() early enough in the ASP.NET Core pipeline for later middleware and endpoints to see the context.
  3. Add the Serilog WithCorrelationId() enricher to the logger and propagate the IDs to downstream requests where required. CorrelationContext stores 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.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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.

Version Downloads Last Updated
2.0.1 0 11/21/2026
2.0.0 0 11/20/2026
1.1.1 228 11/17/2026
1.1.0 199 11/17/2026
1.0.6 200 11/16/2026
1.0.5 262 11/14/2026
1.0.4 320 11/9/2026
1.0.3 191 11/9/2026
1.0.1 260 11/6/2026
1.0.0 218 11/5/2026

Initial release.