Azure Service Fabric 日志记录到 Azure 诊断不起作用

标签 azure azure-service-fabric

我尝试设置将 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

最佳答案

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

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

关于Azure Service Fabric 日志记录到 Azure 诊断不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37541237/

相关文章:

azure - 从 Azure 存储中删除 "subpath"

azure - 从 Azure Active Directory 访问所需的响应

c# - Azure 应用程序配置未加载 key

azure - 如何查看请求日志 Service Fabric 应用程序

azure - 在服务结构中使用的环境变量 ASPNETCORE_ENVIRONMENT 是什么

azure - 可以使用 CosmosDB (DocumentDB) Xamarin 和 dot .net 标准库。

Azure AD B2C 用户名注册声明

azure-service-fabric - 服务结构 : need faster local deployment for development

azure-service-fabric - 升级到服务结构的版本 3 时丢失 CreateServiceRemotingListener

c# - 使用通用参数的 Azure Service Fabric 远程处理