Search code examples
azure-service-fabricazure-application-insightsservice-fabric-statefulevent-flow

ServiceFabric. ApplicationInsights. EventFlow. Disabling log messages from TplEventSource


I am working on Service Fabric(5.5.216) project. Please bear in mind, that I am new to Azure development, so I might miss something really obvious. I am using VS 2015 Update 3. .Net Framework 4.6.2. I've been able to add Application Insights(2.2.0) logging to my service. I've used EventFlow(1.1.0) and EventFlow.ServiceFabric(1.1.1) packages to do that. It's all working nice and good, but I see many messages from TplEventSource(presumably from Task Parallel Library?) in the ApplicationInsights log like those:

"Beginning 2 loop 123 from Task 23."
"Ending 2 loop 123 from Task 23."

Well, to be totally honest I don't see much value(like at all) in polluting the log with those messages. So question is:

Is there any way to inform EventFlow or Service Fabric or anybody else(whoever it is) to not log those messages?


Solution

  • This is being tracked now (https://github.com/Azure/diagnostics-eventflow/issues/72)

    You can add this as a workaround:

    "filters": [
    {
      "type": "drop",
      "include": "level == verbose || ProviderName == System.Threading.Tasks.TplEventSource"
    }],