biswpo
biswpo

Reputation: 809

Can we configure Azure application Insights to only sample the request telemetry and not the rest

I am using azure AI for telemetry in my project. But AI is pretty costly and it seems to keep using AI we need enable sampling.

I wanted to know how the sampling is done, can we configure it on the level of telemetry type. Would it be possible to only sample request telemetry and not the trace or exception telemetry.Also is it possible to only sample the success case and not the failure cases

Upvotes: 0

Views: 567

Answers (1)

Dmitry Matveev
Dmitry Matveev

Reputation: 2679

Yes to all. Here is a lengthy article about all sampling types and available configuration in Application Insights.

Shortly:

  • Sampling can be set at a certain percent or sampling can be adaptive and set to a certain "items per second" level (and it will adjust percentage dynamically);
  • Sampling can include/exclude certain types with <ExcludedTypes> added to the sampling node in ApplicationInsights.config file or via code;
  • Sampling is enabled by default if you install Microsoft.ApplicationInsights.Web or Microsoft.ApplicationInsights.AspNetCore Nuget packages
  • You can set your own filters with Telemetry Processors to sample out unwanted telemetry such as successful of fast requests and similar..

Upvotes: 1

Related Questions