2017-06-08 47 views
3

Microsoft提供了可在Application Insights中爲TelemetryChannel class設置的許多設置的文檔。如何更改Application Insights的TelemetryChannel屬性?

但我無法找到如何設置這些設置的任何解釋。

在這樣的ApplicationInsights.config文件設置它們不會對我的web應用程序的工作:

<TelemetryChannel Type="Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.ServerTelemetryChannel, Microsoft.AI.ServerTelemetryChannel"> 
    <DataUploadIntervalInSeconds>1</DataUploadIntervalInSeconds> 
    <MaxTelemetryBufferCapacity>1</MaxTelemetryBufferCapacity> 
</TelemetryChannel> 

我只是似乎無法影響我的web應用程序兌現這些設置。

這些設置如何調整?

回答

0

下面的git中的示例配置引發了使用的想法。您必須使用Profiles &設置這些設置。

<ApplicationInsights xmlns="http://schemas.microsoft.com/ApplicationInsights/2013/Settings"> 
<ActiveProfile>Production</ActiveProfile> 
<Profiles> 
<Profile name="Production"> 
     <!-- <ServerAnalytics> controls Application Insights Telemetry SDK settings. --> 
     <ServerAnalytics enabled="true"> 
     <!-- The frequency in seconds with which the SDK uploads data to Application Insights. --> 
     <DataUploadIntervalInSeconds>60</DataUploadIntervalInSeconds> 
</Profile> 
    </Profiles> 
</ApplicationInsights> 

https://github.com/postsharp/ApplicationInsightsExample/blob/master/ApplicationInsightsExample/ApplicationInsights.config

+0

您是否嘗試過這一點,並證實它爲你的作品?我只是試過這個,但它不會改變我的應用程序的數據上傳間隔。 – AaronK

+0

配置密鑰有一個新名稱:MaxTelemetryItemsPerSecond。 https://docs.microsoft.com/en-us/azure/application-insights/app-insights-sampling#adaptive-sampling-at-your-web-server –

+0

我剛試過這個設置,它仍然沒有' t似乎適用於數據上傳間隔。你確定這對你有用嗎? – AaronK

相關問題