You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
The key has expired.
New features
New components
Introducing CorrelationContext as container for current CorrelationId 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 from HttpContext
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 and netstandard2.0
...
Starting with 2.0.1 as I screwed up version of pre-release package
Breaking changes
Configuration
Configure with AddCorrelator() requires additional steps registering ICorrelationContextFactory and ICorrelationEmitter, new extension AddDefaultCorrelator 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 replace TraceIdentifier)
Options.Factory changed from Func<CorrelationId> to Func<HttpContext, CorrelationId>?
PropagationSettings.KeepIncomingHeaderName changed from property to static method where you can provide fallback header name
Namespace changes
IServiceCollection extensions (AddCorrelation, ...) moved under W4k.AspNetCore.Correlator.Extensions.DependencyInjection namespace
IHttpClientBuilder extension (WithCorrelation) moved under W4k.AspNetCore.Correlator.Extensions.DependencyInjection
namespace
CorrelatorHttpMessageHandler moved under W4k.AspNetCore.Correlator.Http namespace