What is autoinstrumentation for Azure Monitor Application Insights?

Autoinstrumentation enables Application Insights to make telemetry like metrics, requests, and dependencies available in your Application Insights resource. It provides easy access to experiences such as the application dashboard and application map.

If your language and platform are supported, select the corresponding link in the Supported environments, languages, and resource providers table for more detailed information. In many cases, autoinstrumentation is enabled by default.

What are the autoinstrumentation advantages?

  • Code changes aren't required.
  • Access to source code isn't required.
  • Configuration changes aren't required.
  • Ongoing SDK update maintenance is eliminated.

Supported environments, languages, and resource providers

The following table shows the current state of autoinstrumentation availability.

Links are provided to more information for each supported scenario.

Note

If your hosting environment or resource provider is not listed in the following table, autoinstrumentation is not supported. You can manually instrument your code using Application Insights SDKs or Azure Monitor OpenTelemetry Distros. For more information, see Data Collection Basics of Azure Monitor Application Insights.

Environment/Resource provider .NET Framework .NET Core / .NET Java Node.js Python
Azure App Service on Windows - Publish as Code ✅ 🔗 ¹ ✅ 🔗 ¹ ✅ 🔗 ¹ ✅ 🔗 ¹
Azure App Service on Windows - Publish as Docker ✅ 🔗 ² ✅ 🔗 ² ✅ 🔗 ² ✅ 🔗 ²
Azure App Service on Linux - Publish as Code ✅ 🔗 ¹ ✅ 🔗 ¹ ✅ 🔗
Azure App Service on Linux - Publish as Docker ✅ 🔗 ✅ 🔗 ✅ 🔗
Azure Functions - basic ✅ 🔗 ¹ ✅ 🔗 ¹ ✅ 🔗 ¹ ✅ 🔗 ¹ ✅ 🔗 ¹
Azure Functions - dependencies ✅ 🔗 ✅ 🔗
Azure Spring Apps ✅ 🔗
Azure Kubernetes Service (AKS) ✅ 🔗
Azure VMs Windows ✅ 🔗 ² ³ ✅ 🔗 ² ³ ✅ 🔗
On-premises VMs Windows ✅ 🔗 ³ ✅ 🔗 ² ³ ✅ 🔗
Standalone agent - any environment ✅ 🔗

Footnotes

Note

Autoinstrumentation was known as "codeless attach" before October 2021.

JavaScript (Web) SDK Loader Script injection by configuration

When using supported SDKs, you can enable SDK injection in configuration to automatically inject JavaScript (Web) SDK Loader Script onto each page.

Language
ASP.NET Core
Node.js
Java

For other methods to instrument your application with the Application Insights JavaScript SDK, see Get started with the JavaScript SDK.

Next steps