I am using event flow to send telemetry data to application insights in a service fabric application. The events seem to be created correctly but I seem to be encountering problems with the eventFlow filtering. When I try to filter my events as a exception or dependency they do not appear inside the application insights portal on Azure.
My logging events are created using eventSource.
Here is my output section from eventFlowConfig.json:
"outputs": [
{
"type": "ApplicationInsights",
"instrumentationKey": "****************************************",
"filters": [
{
"type": "metadata",
"metadata": "exception",
"include": "EventId == 10",
"exceptionProperty": "operationType"
}
]
Here are the versions of the packages I am using which are most relevant to this problem:
<package id="Microsoft.Diagnostics.EventFlow.Core" version="1.1.4" targetFramework="net46" />
<package id="Microsoft.Diagnostics.EventFlow.EtwUtilities" version="1.1.0" targetFramework="net46" />
<package id="Microsoft.Diagnostics.EventFlow.Inputs.EventSource" version="1.1.1" targetFramework="net46" />
<package id="Microsoft.Diagnostics.EventFlow.Outputs.ApplicationInsights" version="1.1.4" targetFramework="net46" />
<package id="Microsoft.Diagnostics.EventFlow.ServiceFabric" version="1.1.3" targetFramework="net46" />
<package id="Microsoft.ApplicationInsights" version="2.4.0-beta4" targetFramework="net46" />
Basically, the exception property needs to contain an exception object, otherwise metadata decoration will fail. I do not think "operationType" property carries an exception, does it? See https://github.com/Azure/diagnostics-eventflow/issues/92 for some ideas on how to deal with this.
There is also an issue that if metadata decoration fails, the event just gets dropped by Application Insights output. This is tracked by https://github.com/Azure/diagnostics-eventflow/issues/95 We'll fix this soon.