2
我們在azure應用程序中廣泛使用了跟蹤日誌記錄,但偶爾我們會發現日誌中的差距可達90m左右。azure trace log有間隙
爲什麼會這樣,我該如何進行診斷?這非常重要,因爲我們將WADLogsTable中的數據用作警報系統的源數據。
更新:抱歉耽擱。我的配置如下:
<system.diagnostics>
<trace>
<listeners>
<add type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=1.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
name="AzureDiagnostics">
<filter type="" />
</add>
</listeners>
</trace>
</system.diagnostics>
配置的其餘部分使用編程方式完成:
公共靜態無效ConfigureDiagnosticMonitor(?時間跨度scheduledTransferPeriod) { 時間跨度STP = scheduledTransferPeriod? DefaultScheduledTransferPeriod;
var config = DiagnosticMonitor.GetDefaultInitialConfiguration();
config.OverallQuotaInMB = 8192;
// configure Windows Event Log monitoring.
config.WindowsEventLog.DataSources.Add("Application!*");
config.WindowsEventLog.ScheduledTransferLogLevelFilter = LogLevel.Warning;
config.WindowsEventLog.ScheduledTransferPeriod = stp;
// configure Diagnostic infrastructure logs
config.DiagnosticInfrastructureLogs.ScheduledTransferLogLevelFilter = LogLevel.Information;
config.DiagnosticInfrastructureLogs.BufferQuotaInMB = 100;
config.DiagnosticInfrastructureLogs.ScheduledTransferPeriod = stp;
// configure Logs
config.Logs.ScheduledTransferLogLevelFilter = LogLevel.Verbose;
config.Logs.BufferQuotaInMB = 100;
config.Logs.ScheduledTransferPeriod = stp;
// configure Directories
config.Directories.DataSources.Add(AzureLocalStorageTraceListener.GetLogDirectory());
config.Directories.ScheduledTransferPeriod = stp;
DiagnosticMonitor.Start("Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString", config);
}
你能提供你的診斷配置嗎? – Igorek
@Igorek yep - 我用這個信息更新了問題。 –