【问题标题】:Azure Service Fabric logging to Azure Diagnostics is not working到 Azure 诊断的 Azure Service Fabric 日志记录不起作用
【发布时间】:2016-09-29 04:51:57
【问题描述】:

我尝试设置将 Service Fabric 日志传输到 Azure 诊断,并且我使用了这篇文章

https://azure.microsoft.com/en-us/documentation/articles/service-fabric-diagnostics-how-to-setup-wad/

[EventSource(Name = "MyCompany-MyApp-WebApi")]
internal sealed class ServiceEventSource : EventSource {}

我已经向 Clustermanifest 添加了一个新的提供程序

{
  "provider": "MyCompany-MyApp-WebApi",
  "scheduledTransferPeriod": "PT5M",
  "DefaultEvents": {
    "eventDestination": "ServiceFabricReliableServiceEventTable"
  }
},

它实际上将所有日志发送到 Azure 诊断,但所有日志条目都是空的(见图)

azure table pic

【问题讨论】:

  • 对我来说同样的问题
  • 尝试使用ETWEventTable 而不是ServiceFabricReliableServiceEventTable
  • 我试过 ETWEventTable。它不起作用

标签: azure azure-service-fabric


【解决方案1】:

尝试仅将 eventDestination 值修改为 EventTable。集群清单应如下所示:

{ "provider": "MyCompany-MyApp-WebApi", "scheduledTransferPeriod": "PT5M", “默认事件”:{ “事件目的地”:“事件表” } },

【讨论】:

    【解决方案2】:

    看看这个sample。 Sample 具有 ARM 模板,可以使用诊断创建集群,还可以帮助您为多个集群创建相同的诊断存储表。它还可以用于 Web api 等 Azure 服务。如果这有帮助会很高兴

    【讨论】:

      猜你喜欢
      • 2017-12-09
      • 1970-01-01
      • 2023-03-07
      • 2021-12-24
      • 1970-01-01
      • 2018-09-07
      • 2023-04-06
      • 1970-01-01
      • 2019-02-21
      相关资源
      最近更新 更多