【问题标题】:Cloud Service Application Insights ETW issues云服务 Application Insights ETW 问题
【发布时间】:2016-06-01 02:16:08
【问题描述】:

我正在尝试让我的 Azure 辅助角色的日志显示在 Application Insights 中。当我运行 Get-AzureServiceDiagnosticsExtension 我得到以下...

<PublicConfig
xmlns="http://schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration">
  <WadCfg>
    <DiagnosticMonitorConfiguration overallQuotaInMB="8192" sinks="applicationInsights.errors">
      <DiagnosticInfrastructureLogs scheduledTransferLogLevelFilter="Verbose" />
      <PerformanceCounters scheduledTransferPeriod="PT1M">
        <PerformanceCounterConfiguration counterSpecifier="\Memory\Available MBytes"
sampleRate="PT3M" />
        <PerformanceCounterConfiguration counterSpecifier="\Processor(_Total)\% Processor Time"
sampleRate="PT3M" />
      </PerformanceCounters>
      <WindowsEventLog scheduledTransferPeriod="PT1M">
        <DataSource name="Application!*[System[(Level=1 or Level=2 or Level=3)]]" />
        <DataSource name="Windows Azure!*[System[(Level=1 or Level=2 or Level=3 or Level=4)]]" />
      </WindowsEventLog>
      <EtwProviders sinks="applicationInsights" />
      <CrashDumps dumpType="Full">
        <CrashDumpConfiguration processName="WaAppAgent.exe" />
        <CrashDumpConfiguration processName="WindowsAzureGuestAgent.exe" />
        <CrashDumpConfiguration processName="WaWorkerHost.exe" />
        <CrashDumpConfiguration processName="DiagnosticsAgent.exe" />
      </CrashDumps>
      <Logs scheduledTransferPeriod="PT1M" scheduledTransferLogLevelFilter="Verbose" />
      <Metrics resourceId="/subscriptions/{My_Subscription_GUID}/resourceGroups/Group/providers/Microsoft.ClassicCompute/domainNames/MyCloudServiceName" />
    </DiagnosticMonitorConfiguration>
    <SinksConfig>
      <Sink name="applicationInsights">
        <ApplicationInsights />
        <Channels>
          <Channel logLevel="Verbose" name="errors" />
        </Channels>
      </Sink>
    </SinksConfig>
  </WadCfg>
  <StorageAccount>myclassicstorage</StorageAccount>
</PublicConfig>

以下来自使用 Set-AzureServiceDiagnosticsExtension 上传的原始 diagnostics.wadcfgx 文件

<PrivateConfig xmlns="http://schemas.microsoft.com/ServiceHosting/2010/10/DiagnosticsConfiguration">
    <StorageAccount name="{myclassicstorage}" key="{MyClassicStorageKey}" endpoint="https://myclassicstorage.blob.core.windows.net/" />
</PrivateConfig>

使用 Azure 存储资源管理器,我可以连接到 myclassicStorage,并且可以在 WADLogsTable 中看到我想要的条目,但是当我转到 Application Insights 时,什么也没有……

所以看起来我的跟踪条目正在存储,但我的 Application Insights 没有从存储中获取数据。

无论如何,问题的答案可能会导致对失败的解释:-

  1. 选择“存储帐户”还是“存储帐户(经典)”是否重要?

  2. ServiceConfiguration.Local.cscfg 和 ServiceConfiguration.Cloud.cscfg 中有 Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString 以及 diagnostics.wadcfgx 文件中的 StorageAccount。为什么有 3 个地方可以设置存储,这些地方应该放什么(我已经设置了相同的细节)。

  3. 在许多示例中, diagnostics.wadcfgx 文件中的 StorageAccount 的端点设置为 https://core.windows.net 它应该设置为什么?

【问题讨论】:

标签: .net azure azure-worker-roles azure-application-insights


【解决方案1】:

它刚刚开始工作。我相信答案是按如下方式更改 EtwProviders 配置...

<EtwProviders>
  <EtwEventSourceProviderConfiguration provider="WaWorkerHost.exe">
    <DefaultEvents />
  </EtwEventSourceProviderConfiguration>
</EtwProviders>

我通过查看发布到 WADLogsTable 的数据得到“WaWorkerHost.exe”

EventName="MessageEvent" Message="2016-06-01 03:17:50,924 [14] 信息 myservice.TaskProcessing [(null)] - 核心完成 - 下一个截止日期 2016-06-01T03:18:27.5430000 " TraceSource="WaWorkerHost.exe"

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-06-28
    • 1970-01-01
    • 1970-01-01
    • 2018-02-16
    • 2017-06-24
    相关资源
    最近更新 更多