Troubleshoot Application Insights auto-instrumentation

This article helps you troubleshoot problems with auto-instrumentation in Application Insights.

Note

Auto-instrumentation used to be known as "codeless attach" before October 2021.

Telemetry data isn't reported after you enable auto-instrumentation

Review these common scenarios if you've enabled Application Insights auto-instrumentation for your app service but don't see telemetry data reported.

The Application Insights SDK was previously installed

Auto-instrumentation fails when .NET and .NET Core apps were already instrumented with the SDK.

Remove the Application Insights SDK if you want to auto-instrument your app.

An app was published by using an unsupported version of .NET or .NET Core

Verify that a supported version of .NET or .NET Core was used to build and publish applications.

See the .NET or .NET Core documentation to determine if your version is supported:

A diagnostics library was detected

Auto-instrumentation fails if it detects the following libraries:

  • System.Diagnostics.DiagnosticSource
  • Microsoft.AspNet.TelemetryCorrelation
  • Microsoft.ApplicationInsights

These libraries must be removed for auto-instrumentation to succeed.

You encounter issues with the Application Insights SDK itself after you enable auto-instrumentation

You can collect self-diagnostic logs for the Application Insights SDK to diagnose issues. For more information, see How to collect self-diagnostic logs for Application Insights SDKs.

More help

If you have questions about Application Insights auto-instrumentation, you can post a question on our Microsoft Q&A question page.

Contact us for help

If you have questions or need help, create a support request, or ask Azure community support. You can also submit product feedback to Azure feedback community.