Turn off Application Insights Turn off Application Insights asp.net asp.net

Turn off Application Insights


Where is exactly turned on I don't know, but I guess that you are looking for a way to feature toggle application insights, and to do so in your Application_Start you could do:

TelemetryConfiguration.Active.DisableTelemetry = true;

Doing this you'll stop sending telemetry info.

I hope this help, if it doesn't please let us know what you tried so I could have a better understanding of your question.

For more information you can check their documentation here. The section about Custom Initializers is also quite interesting and maybe will help you as well.


The short answer is that in order to mute Application Insights telemetry, you need to set the DisableTelemetry flag to false.

However, you need to make sure that you're setting the flag on the correct TelemetryConfiguration instance. So if you're using a TelemetryConfiguration other than TelemetryConfiguration.Active, you need to set the flag on that instance. It is also possible that PerformanceCollectorModule telemetry module is using a TelemetryConfiguration instance which is different from the one your TelemetryClient uses.

Let's clarify a couple of things before we move any further:

  1. Do you only see Microsoft.ApplicationInsights.PerformanceCounter-related items in the Output window or do you also see other items?

  2. How are you configuring Application Insights? Do you use ApplicationInsights.config file? Do you create your own TelemetryConfiguration instances and TelemetryClient instances? A code snippet demonstrating your initialization process would help a lot.


Is this question about how to turn off the Application Insights or turn off the Application Insights Telemetry? Cause the above two answers are both about how to turn off the telemetry.

Actually application insights on azure portal communicate with your web application via in the applicationinsights.config. If you want to disable it, just set the key value empty.