15

Now I really do quite like the new Application Insights with Visual Studio 2013, and I don't want to remove it. However, it does spam my Debug output quite a lot.

I get rows upon rows of output like

Application Insights Telemetry: {"ver":1,"name":"Microsoft.ApplicationInsights.PerformanceCounter","time":"2015-04-23T11:38:03.1252550+01:00","iKey":"758c18d5-055e-48a8-bbcf-9c3301402b2c","tags":{"ai.internal.sdkVersion":"0.13.2.132","ai.application.ver":"Unknown","ai.device.type":"PC","ai.device.id":"Pat-PC","ai.device.oemName":"Dell Inc.","ai.device.model":"Dell XPS430                  ","ai.device.network":"6","ai.device.language":"en-GB","ai.device.machineName":"Pat-PC","ai.device.os":"Windows NT 6.1.7601.65536"},"data":{"type":"Microsoft.ApplicationInsights.PerformanceCounterData","item":{"categoryName":"Processor","counterName":"% Processor Time","instanceName":"_Total","value":35.9710731506348,"ver":1}}}

This kinda makes it impossible for me to actually use the Debug output for my debug statements. How can I silence Application Insights, or configure Visual Studio to just not show those statements?

RamblerToning
  • 926
  • 2
  • 13
  • 28

2 Answers2

5

To simply turn off these messages, with no other side effects:

TelemetryDebugWriter.IsTracingDisabled = true;
Iain
  • 1,797
  • 1
  • 20
  • 38
4

Hans Passant is right. DeveloperMode is what triggers AI to write events in DebugOutput. Note though that it also forces AI to send data immediately. So if we set it to false data will be batched and sent out once a minute.

Anastasia Black
  • 1,890
  • 9
  • 21