Adds two additional options that can be set when adding the Correlation ID middleware:
-
UpdateTraceIdentifier - Controls whether the ASP.NET Core TraceIdentifier will be set to match the CorrelationId. The default value is
true
. -
UseGuidForCorrelationId - Controls whether a GUID will be used in cases where no correlation ID is retrieved from the request header. When false the TraceIdentifier for the current request will be used. The default value is
false
.
Adds an additional property Header
to the CorrelationContext
so that the currently configured header name can be retrieved easily to then be set on downstream requests.
POTENTIAL BREAKING CHANGE:
Unfortunately, despite this being a minor release a potential breaking change has slipped in. The Create method on the CorrelationContextFactory requires two arguments (previously one). If you are mocking or using this class directly then this change may affect you.