Skip to main content
Azure
  • 1 min read

Sampling in Application Insights: How to keep the volume of your telemetry under control

Modern applications with many users can generate a lot of telemetry data. While it is a pretty common (and almost always wrong) perception that you absolutely must collect every piece of the application telemetry, doing so may come at a high price.

Modern applications with many users can generate a lot of telemetry data. While it is a pretty common (and almost always wrong) perception that you absolutely must collect every piece of the application telemetry, doing so may come at a high price. In addition to dealing with an increased cost of storing more data in Application Insights, your application will have higher network consumption, and the performance impact from monitoring may be high.

Moreover, when the volume of telemetry surpasses throttling limits, Application Insights will start dropping the data. When this happens, your application telemetry goes totally out of control. The metrics no longer reflect accurate values and the diagnostic experience is busted since the telemetry item you're looking for could have been throttled out. To give you control of the volume of collected data, and to protect against the issues from generating too much of telemetry, a recent release of Application Insights SDK 2 beta introduces the concept of sampling.

From the application standpoint, sampling is a feature of the SDK that allows you to collect and store a reduced set of telemetry while maintaining a statistically correct analysis of application data in the portal. Currently, sampling can be used with ASP.NET web applications on both client and server sides, or only from the client-side for web applications written with other (non .NET) server-side platforms.

Learn more about how sampling can help you keep the volume of application telemetry down and also how to configure sampling with your web applications here.