2017-06-08 3 views
3

Microsoft fournit la documentation de nombreux paramètres qui peuvent être définis pour le TelemetryChannel class dans Application Insights.Comment puis-je modifier les propriétés TelemetryChannel pour Application Insights?

Mais je ne trouve aucune explication sur la façon dont ces paramètres peuvent être définis.

en les replaçant dans le fichier ApplicationInsights.config comme celui-ci ne fonctionne pas pour mon application Web:

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

Je ne peux tout simplement semblent pas influencer mon application Web pour honorer ces paramètres.

Comment ces réglages peuvent-ils être ajustés?

Répondre

0

L'exemple de configuration ci-dessous git déclenche l'idée d'utilisation. Vous devez utiliser les profils & pour définir ces paramètres.

<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

Avez-vous essayé et a confirmé cela fonctionne pour vous? J'ai juste essayé ceci mais cela ne change pas l'intervalle de téléchargement de données pour mon application. – AaronK

+0

La clé de configuration a reçu un nouveau nom: MaxTelemetryItemsPerSecond. https://docs.microsoft.com/fr-fr/azure/application-insights/app-insights-sampling#adaptive-sampling-at-your-web-server –

+0

Je viens d'essayer ce réglage et ça ne marche toujours pas t semblent fonctionner pour l'intervalle de téléchargement des données. Êtes-vous sûr que cela fonctionne pour vous? – AaronK