Ignore endpoints from Azure Application Insights

I turned on the traffic manager and monitoring settings in my web role, now my use of Insights applications is completely unsuitable (11,000 impressions in a 24-hour period from Internet Explorer or Windows NT) and marks it as "real user traffic"? Smh.

Further trauma is the terrible UX to β€œfilter” route names from blades, especially when I have dozens of endpoints that cannot be saved. I also did not find a way to export to .pdf so that I could share with advisors and / or investors. Can I export all this data to JSON and create my own reports / analytics to spend time, resources and money on reconstructing what has already been created and what I am already paying for? Not calculated.

Is there a way to set the MVC attribute / filter on a specific endpoint or route so that it does not participate in tracking Insight application server requests? Or is it too easy?

+5
source share
1 answer

If you have a way to differentiate the synthetic traffic in the code, for example, by viewing the headers, you can mark it as such using the telemetry initializer, for example:

public class SyntheticSourceInitializer : ITelemetryInitializer { public void Initialize(Microsoft.ApplicationInsights.Channel.ITelemetry telemetry) { if (MySyntheticCheck(HttpContext.Current.Request)) { telemetry.Context.Operation.SyntheticSource = "MySyntheticSource"; } } } 

See this blog post on how to register a telemetry initializer.

Once you identify the traffic as synthetic, you can filter it.

+3
source

All Articles