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

adds correlation id to log context #41

Closed engenb closed 4 years ago

engenb commented 5 years ago

Just wanted to propose this as a POC before taking it further...

What you're doing here is very similar to something I'm doing as well, but yours is better. If you can't beat 'em, join em!

The only thing missing from what I'd like is for the correlation id to be added to the log context to easily group log entries in structured log aggregators.

Requires an additional dependency on Microsoft.Extensions.Logging.Abstractions but it's a pretty safe bet that's not an issue since this is intended for use with AspNetCore.

Thoughts?

SmilieLyon commented 4 years ago

I love the idea and was planning on making a similar PR. My company however wants to have a different logging property name than "CorrelationId"