Skip to content

Releases: wdolek/w4k-aspnetcore-correlator

v2.1.0

01 Sep 21:31
92c73b6
Compare
Choose a tag to compare

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 is List<string> now - that means order of values matters - you now have better control over reading header value
  • Breaking CorrelatorHttpMessageHandler constructor requires PropagationSettings instead of IOptions<CorrelatorOptions>

v2.0.1

31 Aug 19:23
cd0f0c1
Compare
Choose a tag to compare

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

Structural changes

  • CorrelationId changed from struct to class
  • CorrelatorHttpMessageHandler is now sealed

v1.1.0

22 Jul 19:27
Compare
Choose a tag to compare
  • Predefined header Request-Id added
  • Improved dependency injection and configuration of HTTP message handler

v1.0.1

22 Jul 19:23
Compare
Choose a tag to compare

Updating dependencies:

  • using ranges [2.1,2.3.0)

v1.0.0

22 Jul 19:20
Compare
Choose a tag to compare

Initial release.