【发布时间】:2020-02-26 20:55:31
【问题描述】:
我正在尝试让默认 Service Fabric 应用日志记录在 Azure 中以与本地相同的方式工作。
在 Visual Studio 2019 v16.4.5 中,我创建了示例 Service Fabric 无状态应用程序 .Net Core 3.1。 一切在本地构建和运行都可以。 在诊断事件窗口中,如果来自示例源代码,我可以看到应用程序日志消息“Working-1522”:
ServiceEventSource.Current.ServiceMessage(this.Context, "Working-{0}", ++iterations);
但是.. 当我部署到 Azure 时,它部署正常并且运行正常,但我不再在任何存储 WADServiceFabricSystemEventTable 或 WADServiceFabricReliableServiceEventTable 表中看到“Working-1522”消息。 我在任何地方都看不到这些消息。
我没有使用 Application Insights。节点具有 IaaSDiagnostics Microsoft.Azure.Diagnostics 扩展,具有以下设置:
{
"WadCfg": {
"DiagnosticMonitorConfiguration": {
"overallQuotaInMB": "50000",
"sinks": "applicationInsights",
"EtwProviders": {
"EtwEventSourceProviderConfiguration": [
{
"provider": "Microsoft-ServiceFabric-Actors",
"scheduledTransferKeywordFilter": "1",
"scheduledTransferPeriod": "PT5M",
"DefaultEvents": {
"eventDestination": "ServiceFabricReliableActorEventTable"
}
},
{
"provider": "Microsoft-ServiceFabric-Services",
"scheduledTransferPeriod": "PT5M",
"DefaultEvents": {
"eventDestination": "ServiceFabricReliableServiceEventTable"
}
}
],
"EtwManifestProviderConfiguration": [
{
"provider": "cbd93bc2-71e5-4566-b3a7-595d8eeca6e8",
"scheduledTransferLogLevelFilter": "Information",
"scheduledTransferKeywordFilter": "4611686018427387904",
"scheduledTransferPeriod": "PT5M",
"DefaultEvents": {
"eventDestination": "ServiceFabricSystemEventTable"
}
}
]
}
},
"SinksConfig": {
"Sink": [
{
"name": "applicationInsights",
"ApplicationInsights": ""
}
]
}
},
"StorageAccount": "wad34xxxxxxxxxxx"
}
有什么建议吗?
【问题讨论】:
标签: azure logging azure-service-fabric