I am trying to set up a simple ETW and EventFlow example that allows specific ETW providers to be monitored. In this case the Service Control Manager ETW provider to monitor when Service Start and Stop messages are issued.
I have the following input configuration for Tracing and ETW.
"inputs": [
{
"type": "Trace",
"traceLevel": "Warning"
},
{
"type": "ETW",
"providers": [
{
"providerName": "Service Control Manager"
}
]
}]
I have the following code which is starting up monitoring using EventFlow.
static void Main(string[] args)
{
using (var pipeline = DiagnosticPipelineFactory.CreatePipeline("eventFlowConfig.json"))
{
System.Diagnostics.Trace.TraceWarning("EventFlow is working!");
Console.ReadLine();
}
}
The trace event is appearing in the console, but when I start and stop a service no ETW events are appearing.
Is EventFlow designed for this scenario on a local machine? If so what am i missing in my configuration or code?
The console process is running as administrator and the account has access to the Performance Log Users and Performance Log Monitors group