1

我試圖讓我的Azure工作者角色的日誌出現在Application Insights中。當我運行Get-AzureServiceDiagnosticsExtension我得到以下...雲服務應用程序洞察ETW問題

<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> 

以下是從原來的diagnostics.wadcfgx文件用設置AzureServiceDiagnosticsExtension

<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想要的條目然而,當我去申請見解,沒什麼......

enter image description here

因此,似乎我的跟蹤條目已將其存儲到存儲中,但我的Application Insights未從存儲中獲取數據。

總之要解決這些問題可能會導致失敗的解釋的答案: -

  1. 不要緊,你是否選擇「存儲帳戶」或「存儲帳戶(經典)」?

  2. ServiceConfiguration.Local.cscfg中包含Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString,ServiceInfiguration.Cloud.cscfg中還包含diagnostics.wadcfgx文件中的StorageAccount。爲什麼有3個地方可以設置存儲空間以及應該放置哪些地方(我已經設置了相同的詳細信息)。

  3. 在許多示例中,diagnostics.wadcfgx文件中的StorageAccount將端點設置爲https://core.windows.net應該將其設置爲?

+0

您是否按照此處的說明操作: https://azure.microsoft.com/en-us/documentation/articles/app-insights-cloudservices/#azure-diagnostics指定儀器密鑰? –

+0

@AlexBulankou是的,這是我閱讀過的很多很多頁面中的一個 – Mick

回答

1

它剛剛開始工作。我相信答案是改變EtwProviders配置如下......

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

我「WaWorkerHost.exe」從看貼到WADLogsTable

事件名稱=「MessageEvent事件」消息的數據=「2016-06-01 03:17:50,924 [14] INFO myservice.TaskProcessing [(null)] - Core Completed - Next due date 2016-06-01T03:18:27.5430000」TraceSource =「WaWorkerHost.exe」

+0

請接受您自己的回答 – abatishchev

相關問題