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

Working with Application Insights Operation ID #29

Closed tamirdresher closed 4 years ago

tamirdresher commented 6 years ago

Hi

Application Insights also provides a correlation identifier (Operation ID) that is used much more deeper in the logging infrastructure, it would have been useful if there was a way to set the CorrelationID to this value and not only generating GUID or taking the ASP.NET TraceIdentifier

If the idead is acceptable, I can create a PR with a configurable CorrelationID generator Func to be passed in the CorrelationIdOptions

tomkerkhove commented 5 years ago

I would like this as well!

stevejgordon commented 4 years ago

There are now two options in the codebase to either provide a Func that sets the correlation ID or to register a custom ICorrelationIdProvider. The next 3.0 release will include those features.