Is it possible to exclude a url from Application Insights?

Greg Enslow picture Greg Enslow · Jul 1, 2015 · Viewed 7.1k times · Source

We have an Azure web role deployed that has been using Application Insights (ver. 1.0.0.4220), however, we're going over our data quota. Is it possible to configure Application Insights ignore a specific URL?

We have a status web service that gets a huge amount of traffic but never throws any errors. If I could exclude this one service URL I could cut my data usage in half.

Answer

Anastasia Black picture Anastasia Black · Jul 1, 2015

Out of the box it is not supported. Sampling feature is coming but that would not be configurable by specific url. You can implement your own channel that would have your custom filtering. Basically your channel will get event to be sent, you check if you want to send it or not and then if yes pass to standard AI channel. Here you can read more about custom channels.

There are two things that changed since this blog post has been written:

  • channel should implement only ITelemetryChannel interface (ISupportConfiguration was removed)
  • and instead of PersistenceChannel you should use Microsoft.ApplicationInsights.Extensibility.Web.TelemetryChannel

UPDATE: Latest version has filtering support: https://azure.microsoft.com/en-us/blog/request-filtering-in-application-insights-with-telemetry-processor/