dotnet / runtime

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

EventPipe logging for self-describing events erroneously cache level/keyword #35393

Open noahfalk opened 4 years ago

noahfalk commented 4 years ago

While doing some code review for EventSource I noticed that we create TraceLoggingEventTypes objects that have a 1:1 mapping with the EventPipe metadata. The challenge is that TraceLoggingEventTypes can be reused for messages logged at any level or with any keywords but EventPipe metadata encodes a specific value for keyword and level. This should mean that multiple calls to EventSource.Write() with the same signature but different keyword/level will all get logged using whatever the 1st message's keyword and level were.

ghost commented 4 years ago

Tagging subscribers to this area: @tarekgh, @tommcdon Notify danmosemsft if you want to be subscribed.

tarekgh commented 4 years ago

@noahfalk @tommcdon I assume your team will take care with this one, could you please triage it and assign it to one of your team?

noahfalk commented 4 years ago

Yeah, this is on us. I marked it Future, and removed 'untriaged' tag. Not sure if anything else is needed here?

tarekgh commented 4 years ago

@noahfalk usually we add a label to the issue to describe the category of the issue. I added the "Bug" label but feel free to change it to something else as needed.