dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.02k stars 4.67k forks source link

Explore using EventSource in front of ILogger #12750

Open noahfalk opened 5 years ago

noahfalk commented 5 years ago

Today there is some friction using ILogger from .Net libraries. Different library authors may have different reasons but some common examples would be ILogger isn't shipped as part of the BCL, or that they don't want to create requirements that the library user pass in an ILogger instance. There are different ideas on how to get deal with this, one of them being use EventSource from the library and let the app developer bridge it to ILogger if that is what they are using.

This issue tracks exploring what that could look like, cataloging potential issues and solutions to those issues. There is some related discussion that already happened in dotnet/runtime#12730 - in particular the desire to transmit Exception objects without serializing them.

reyang commented 2 years ago

In addition, folks using EventSource might want to get the correlation with Activity. This could also be done by updating the ETW correlation GUID during Activity creation/destruction.