Repository navigation
EventSource does not write all events to EventPipe - #35334
Conversation
|
Tagging subscribers to this area: @tommcdon |
|
The WriteEventString still doesn't actually write to EventPipe even with this change. I suspect it's because the EventSource is never enabled so it bails in EventPipe::WriteEvent. I need to investigate a little more. |
|
Ok, with the latest commit I have it so that if EventSource runs in to an error during creating of the manifest it will log the error to EventPipe. It turned in to a bigger rabbit hole than expected, the issue is that WriteEventString tries to write an event without any metadata, and the native EventPipe stuff expects metadata for everything. I looked at making the native side take an event without metadata but it would touch a ton of files and add a ton of logic. Instead, I went with the approach that if EventSource calls WriteEventString then it will create a custom event to write to EventPipe with id=0. |
sywhang
left a comment
There was a problem hiding this comment.
Thanks David! Can we add a test for WriteEventString and consuming it via EventPipe as part of this PR?
|
@sywhang Sure, I just added a test |
noahfalk
left a comment
There was a problem hiding this comment.
The implementation direction makes me a little nervous. More thoughts inline and happy to chat on it anytime. Thanks David!
bd30137 to
a3b30af
Compare
Currently if an EventPipe session is enabled but an etw session is not, EventSource will not write any events that go through
WriteEventRawto EventPipe. The first line checks if m_etwProvider is null and bails if it is, so it never gets to the EventPipe call.We also don't write any error messages through
ReportOutOfBandMessageto EventPipe