Reputation: 11501
I have a website on Azure app service(website) that logs a lot of data in my application insights. I like to have sampling only for requests, because there are a lot of them, but I need to have all my custom Events as they have a buisiness value. How can I do that?
I've tried the
application insights> Usage and estimated costs > Data Sampling
But the only option is to enable it for everything:
After opening:
Upvotes: 3
Views: 1176
Reputation: 3959
You can configure a custom sampling rate in your ApplicationInsights.config file. There it is possible to include or exclude specific types from sampling.
Example:
<Add Type="Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.AdaptiveSamplingTelemetryProcessor, Microsoft.AI.ServerTelemetryChannel">
<MaxTelemetryItemsPerSecond>500</MaxTelemetryItemsPerSecond>
<MaxSamplingPercentage>10.0</MaxSamplingPercentage>
<MinSamplingPercentage>1.0</MinSamplingPercentage>
<ExcludedTypes>Event,Exception</ExcludedTypes>
<IncludedTypes>Request</IncludedTypes>
</Add>
See here for the complete documentation.
Upvotes: 3