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 Software Development Kits (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