stevejgordon / CorrelationId

An ASP.NET Core middleware component which synchronises a correlation ID for cross API request logging.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add option to allow toggling correlation ID auto generation

natenho opened this issue · comments

The feature could be a property like "AutoGenerateIfMissing" into CorrelationIdOptions with default true, to keep backward compatibility.

Sometimes you don't want the correlation ID to be auto generated when it is not present in the header and the application could have the opportunity to decide things based on the absence of the header.

This can be achieved in the new version (not yet released) using a custom provider.