服务结构。应用洞察。事件流。禁用来自 TplEventSource 的日志消息

ServiceFabric. ApplicationInsights. EventFlow. Disabling log messages from TplEventSource

我正在处理 Service Fabric(5.5.216) 项目。请记住,我是 Azure 开发的新手,所以我可能会错过一些非常明显的东西。我正在使用 VS 2015 Update 3..Net Framework 4.6.2。我已经能够将 Application Insights(2.2.0) 日志添加到我的服务中。我使用 EventFlow(1.1.0) 和 EventFlow.ServiceFabric(1.1.1) 包来做到这一点。一切都很好,但我在 ApplicationInsights 日志中看到许多来自 TplEventSource(大概来自 Task Parallel Library?)的消息,如下所示:

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

好吧,老实说,我认为用这些消息污染日志没有多大价值(完全没有)。所以问题是:

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

正在跟踪中(https://github.com/Azure/diagnostics-eventflow/issues/72

您可以将此添加为解决方法:

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