Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Application Insights TraceListener is not collecting traces?

I have the following configuration in place, but no traces are going into Application Insights (otherwise Application Insights is working fine for other logging and the Azure diagnostics listener is also working and capturing the traces). Am I doing something wrong?

<system.diagnostics>
    <trace autoflush="true" indentsize="0">
      <listeners>
        <add type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=2.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" name="AzureDiagnostics">
        </add>
        <add name="myAppInsightsListener" type="Microsoft.ApplicationInsights.TraceListener.ApplicationInsightsTraceListener, Microsoft.ApplicationInsights.TraceListener" />
      </listeners>
    </trace>
  </system.diagnostics>
like image 439
Ivan Zlatev Avatar asked Aug 05 '15 17:08

Ivan Zlatev


Video Answer


1 Answers

I had the same problem.

My steps to resolve after my discussion in the comments here were:

  1. Uninstall all App Insights NuGet packages
  2. Delete ApplicationInsights.config
  3. Install ApplicationInsights.Web
  4. Install ApplicationInsights.TraceListener
  5. Add InstrumentationKey for your App Insights instance to ApplicationInsights.config

Hope this helps.

like image 169
Liam Avatar answered Oct 20 '22 13:10

Liam