Question

As the question states, if I had an exception occur in my service I'd like it to show in the Admin channel so we don't have to turn on diagnostics to see it in the debug channel. For example, we could miss the event if the log wasn't turned on. However, it would be nice to see see the error in the debug channel in the context of a trace. To achieve this I would need to have it show in both channels.

What is the best way to achieve this with ETW?

Was it helpful?

Solution

Had no response for this question for a while. The way I handled this wasto make the ETW specific event private and create a public helper method with the [NonEvent] attribute. This takes the parameters for the event as usual but then makes 2 calls to the actual event methods, one that is defined for admin and the other defined for debug.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top