stevejgordon / CorrelationId

An ASP.NET Core middleware component which synchronises a correlation ID for cross API request logging.
MIT License
558 stars 106 forks source link

Add option to allow toggling correlation ID auto generation #47

Closed natenho closed 4 years ago

natenho commented 4 years ago

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.

stevejgordon commented 4 years ago

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