Flush() in Azure App Insights

≡放荡痞女 提交于 2019-12-01 00:14:33

Flush() on TelemetryClient pushes all the data it currently has in a buffer to the App Insights service. You can see its source code here: https://github.com/Microsoft/ApplicationInsights-dotnet/blob/3115fe1cc866a15d09e9b5f1f7f596385406433d/src/Microsoft.ApplicationInsights/TelemetryClient.cs#L593.

Normally, Application Insights will send your data in batches in the background so it uses the network more efficiently. If you have developer mode enabled or call Flush() manually, data is sent immediately.

Typically you do not need to call Flush(). But in a case where you know the process will exit after that point, you'll want to call Flush() to make sure all the data is sent.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!