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

Exclude endpoints feature

dmytrohridin opened this issue · comments

Hi,
What about separate setting option that will allow to specify API endpoints for which correlation id will be ignored and will not generate?
Use case:
In my API I use HTTP logging, and I want health check endpoints do not generate CorrelationId. For sure it can be filtered on logging level before sending logs to the datastore, but what about such a feature for this library?
It should not affect backward compatibility. If my idea makes sense - I can implement this one.

Another use case:
Turn on enforce header, health endpoints will fail.
Any idea for a workaround?