Releases: wdolek/w4k-aspnetcore-correlator
Releases · wdolek/w4k-aspnetcore-correlator
v2.1.0
New stuff / changes
- It is now possible to configure
CorrelatorHttpMessageHandler
separately, so you can use different header when talking to specific (legacy) service - Breaking
CorrelatorOptions.ReadFrom
isList<string>
now - that means order of values matters - you now have better control over reading header value - Breaking
CorrelatorHttpMessageHandler
constructor requiresPropagationSettings
instead ofIOptions<CorrelatorOptions>
v2.0.1
New features
New components
- Introducing
CorrelationContext
as container for currentCorrelationId
with additional information about HTTP header (when correlation received) - Introducing
ICorrelationContextAccessor
for accessing current correlation context - Introducing
ICorrelationContextEmitter
for returning (emitting)CorrelationId
back to caller - Possibility to provide own implementations of:
ICorrelationContextFactory
for reading correlation fromHttpContext
ICorrelationEmitter
for returning correlation back to caller (handy when correlation ID is generated)
Options
- Option to preserve
HttpContext.TraceIdentifier
Other
- Support for structured logging
- Targeting both
netstandard2.1
andnetstandard2.0
- ...
- Starting with
2.0.1
as I screwed up version of pre-release package
Breaking changes
Configuration
- Configure with
AddCorrelator()
requires additional steps registeringICorrelationContextFactory
andICorrelationEmitter
, new extensionAddDefaultCorrelator
introduced for simple configuration
Options
HttpContext.TraceIdentifier
is preserved by default (correlation ID won't overwrite trace identifier, you can access correlation via accessor; optionally you can configure Correlator to replaceTraceIdentifier
)Options.Factory
changed fromFunc<CorrelationId>
toFunc<HttpContext, CorrelationId>?
PropagationSettings.KeepIncomingHeaderName
changed from property to static method where you can provide fallback header name
Namespace changes
IServiceCollection
extensions (AddCorrelation
, ...) moved underW4k.AspNetCore.Correlator.Extensions.DependencyInjection
namespaceIHttpClientBuilder
extension (WithCorrelation
) moved underW4k.AspNetCore.Correlator.Extensions.DependencyInjection
namespaceCorrelatorHttpMessageHandler
moved underW4k.AspNetCore.Correlator.Http
namespace
Structural changes
CorrelationId
changed fromstruct
toclass
CorrelatorHttpMessageHandler
is nowsealed