Reputation: 8691
I'd like to switch to using Application Insights for logging etc. I know I'm going to need to use sampling on my telemetry data, to stay within the free plan. However, I want to be able to see all event sequences that led to an exception being thrown, so I can reproduce them.
Does Application Insights come with something like this built in? And if not, is there some way I can write a custom sampler which produces the desired behaviour? E.g.
class CustomSampler : ITelemetrySampler
Upvotes: 4
Views: 1657
Reputation: 1806
There is the ExcludeTypes property in version 2.2.0 of the AdaptiveSamplingTelemetryProcessor.
<Add Type="Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.AdaptiveSamplingTelemetryProcessor, Microsoft.AI.ServerTelemetryChannel">
<MaxTelemetryItemsPerSecond>499</MaxTelemetryItemsPerSecond>
<ExcludedTypes>Exception</ExcludedTypes>
</Add>
From the release notes of 2.2.0-beta1
Telemetry types can be excluded from sampling by specifying the ExcludedTypes property (Add ExcludedTypes element under AdaptiveSampling telemetry processor node with ';'-separated list. Possible types are "Dependency", "Event", "Exception", "PageView", "Request", "Trace").
Upvotes: 9