CorrelationId 2.1.0

.NET Standard 1.4
There is a newer version of this package available.
See the version list below for details.
dotnet add package CorrelationId --version 2.1.0
NuGet\Install-Package CorrelationId -Version 2.1.0
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="CorrelationId" Version="2.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CorrelationId --version 2.1.0
#r "nuget: CorrelationId, 2.1.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install CorrelationId as a Cake Addin
#addin nuget:?package=CorrelationId&version=2.1.0

// Install CorrelationId as a Cake Tool
#tool nuget:?package=CorrelationId&version=2.1.0

Adds two additional options that can be set when adding the Correlation ID middleware:

UpdateTraceIdentifier - Controls whether the ASP.NET Core TraceIdentifier will be set to match the CorrelationId. The default value is true.

UseGuidForCorrelationId - Controls whether a GUID will be used in cases where no correlation ID is retrieved from the request header. When false the TraceIdentifier for the current request will be used. The default value is false.

Adds an additional property Header to the CorrelationContext so that the currently configured header name can be retrieved easily to then be set on downstream requests.


Unfortunately, despite this being a minor release a potential breaking change has slipped in. The Create method on the CorrelationContextFactory requires two arguments (previously one). If you are mocking or using this class directly then this change may affect you.

Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows
.NET Core netcoreapp1.0 netcoreapp1.1 netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard1.4 netstandard1.5 netstandard1.6 netstandard2.0 netstandard2.1
.NET Framework net461 net462 net463 net47 net471 net472 net48
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen30 tizen40 tizen60
Universal Windows Platform uap uap10.0
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (28)

Showing the top 5 NuGet packages that depend on CorrelationId:

Package Downloads

Package Description


Package Description


Package Description


Package Description


Extensions that enhance HttpClient and Http Logging

GitHub repositories (3)

Showing the top 3 popular GitHub repositories that depend on CorrelationId:

Repository Stars
Wraps the .NET SDK for Azure Cosmos DB abstracting away the complexity, exposing a simple CRUD-based repository pattern
Sample using Command and Query Responsibility Segregation (CQRS) implemented in .NET Core by using MediatR and identityserver4, background workers, real-time metrics, monitoring, logging, validations, swagger and more
A sample ASP.NET Core project showing how to configure the HttpClientFactory
Version Downloads Last updated
3.0.1 2,842,897 8/14/2021
3.0.0 2,541,407 5/18/2020
3.0.0-preview.1 76,179 12/20/2019
2.1.0 4,015,160 4/8/2018
2.1.0-rc3 953 4/6/2018
2.1.0-rc2 871 3/29/2018
2.1.0-rc 795 3/28/2018
2.0.1 99,462 12/31/2017
1.0.1 26,135 10/31/2017
1.0.0 21,411 5/4/2017