Bsft.Correlation.Abstractions
2.2.0
dotnet add package Bsft.Correlation.Abstractions --version 2.2.0
NuGet\Install-Package Bsft.Correlation.Abstractions -Version 2.2.0
<PackageReference Include="Bsft.Correlation.Abstractions" Version="2.2.0" />
<PackageVersion Include="Bsft.Correlation.Abstractions" Version="2.2.0" />
<PackageReference Include="Bsft.Correlation.Abstractions" />
paket add Bsft.Correlation.Abstractions --version 2.2.0
#r "nuget: Bsft.Correlation.Abstractions, 2.2.0"
#:package Bsft.Correlation.Abstractions@2.2.0
#addin nuget:?package=Bsft.Correlation.Abstractions&version=2.2.0
#tool nuget:?package=Bsft.Correlation.Abstractions&version=2.2.0
Bsft.Correlation.Abstractions
The correlation contract of the Bsft.Correlation family: the request-scoped ID a component reads,
the header name it travels under, and LogScopeKeys.CorrelationId, the key of the id in a log scope that
the producer and the log sinks share. Reference this rather than Bsft.Correlation from anything that
only needs to read a correlation ID.
Install
dotnet add package Bsft.Correlation.Abstractions
Requires nothing at all. The empty dependency list is the point of the package and is pinned by a test:
Bsft.Correlation carries a FrameworkReference to Microsoft.AspNetCore.App for its middleware, and
a Blazor WebAssembly bundle or a console tool must not acquire the server stack just to read an ID.
Register
// Nothing. An .Abstractions package has no DI entry point.
services.AddBsftCorrelation(); // in Bsft.Correlation, which supplies the implementation
Nothing else is required. A host registers the implementation from Bsft.Correlation; a library that
consumes the contract references only this package and takes ICorrelationContext in its constructor.
Configure
| Option | Default | Effect |
|---|---|---|
| — | — | No options type. CorrelationDefaults.CorrelationId (X-Correlation-Id) is a constant rather than a setting, so that the middleware, the outbound handler and every adapter package cannot disagree about it. |
Validation: none — the package has no configuration and registers nothing.
Extend
ICorrelationContext — supplies the correlation ID of the current scope. Bsft.Correlation ships
CorrelationContext, a scoped holder the middleware writes on each request; replace it where the ID
comes from somewhere other than the inbound header, for instance a message envelope in a worker with no
HTTP pipeline (which is what Bsft.Messaging.Correlation and Bsft.Scheduling.Correlation do).
CorrelationIdDelegatingHandler used to live here and now lives in
Bsft.Correlation.Http: it is a live implementation, which
docs/package-conventions.md keeps out of an .Abstractions package by name. That package is
client-safe in the same way this one is — its closure is this package and the DI abstractions — so a
client that wants the outbound half takes it and still never sees ASP.NET Core.
Documentation
Topic page: docs/correlation.md. Conventions: docs/package-conventions.md.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. 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
- No dependencies.
-
net8.0
- No dependencies.
NuGet packages (4)
Showing the top 4 NuGet packages that depend on Bsft.Correlation.Abstractions:
| Package | Downloads |
|---|---|
|
Bsft.Correlation.Http
BSFT Framework outbound correlation propagation: the HttpClient delegating handler that attaches the X-Correlation-Id header. Pure .NET with no ASP.NET Core dependency, so a Blazor WebAssembly or console client can propagate a correlation ID without pulling the server stack into its bundle. |
|
|
Bsft.Correlation
BSFT Framework correlation ID tracking for ASP.NET Core |
|
|
Bsft.Logging
BSFT Framework rolling file logging provider with structured output, paging and live tailing |
|
|
Bsft.Observability
BSFT Framework OpenTelemetry integration: AddBsftObservability wires traces and metrics (OTLP + console), optional OTLP/console log export, and discovers Bsft instrumentation sources registered via Bsft.Instrumentation. |
GitHub repositories
This package is not used by any popular GitHub repositories.