SaanSoft.CorrelationId
1.1.1
See the version list below for details.
dotnet add package SaanSoft.CorrelationId --version 1.1.1
NuGet\Install-Package SaanSoft.CorrelationId -Version 1.1.1
<PackageReference Include="SaanSoft.CorrelationId" Version="1.1.1" />
paket add SaanSoft.CorrelationId --version 1.1.1
#r "nuget: SaanSoft.CorrelationId, 1.1.1"
// Install SaanSoft.CorrelationId as a Cake Addin #addin nuget:?package=SaanSoft.CorrelationId&version=1.1.1 // Install SaanSoft.CorrelationId as a Cake Tool #tool nuget:?package=SaanSoft.CorrelationId&version=1.1.1
SaanSoft.CorrelationId
In a distributed system it can be a challenge to trace HTTP requests and messages through multiple microservices.
A CorrelationId
is metadata than can be used to bundle each logical transaction as it moves through multiple processors.
With this system, your client's requests are collected under one value for easier tracking and troubleshooting.
Register in IoC
ICorrelationIdProvider
should be registered at the request scope level, as it should be use the same
object across all calls for a HTTP request or logical transaction.
IServiceCollection
For api and web projects using the normal AddScoped
function is perfect.
serviceCollection.AddScoped<ICorrelationIdProvider, CorrelationIdProvider>();
Usage
Pass ICorrelationIdProvider
into the class's constructor, then call correlationIdProvider.Get()
to retrieve the CorrelationId
for the current request.
Dependencies
CorrelationIdProvider
can be used by itself, and it will provide a unique string for each request.
However, you can also setup CorrelationIdProvider
to use values from other sources such as HTTP request header by using other dependencies and middleware.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- No dependencies.
-
net7.0
- No dependencies.
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
See https://github.com/saan800/saansoft-correlationid/releases for details.