What is auto-instrumentation for Azure Monitor application insights?

Auto-instrumentation allows you to enable application monitoring with Application Insights without changing your code.

Application Insights is integrated with various resource providers and works on different environments. In essence, all you have to do is enable and - in some cases - configure the agent, which will collect the telemetry automatically. In no time, you'll see the metrics, requests, and dependencies in your Application Insights resource. This telemetry will allow you to spot the source of potential problems before they occur, and analyze the root cause with end-to-end transaction view.


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

Supported environments, languages, and resource providers

As we're adding new integrations, the auto-instrumentation capability matrix becomes complex. The table below shows you the current state of the matter as far as support for various resource providers, languages, and environments go.

Environment/Resource Provider .NET .NET Core Java Node.js Python
Azure App Service on Windows - Publish as Code GA, OnBD* GA GA GA, OnBD* Not supported
Azure App Service on Windows - Publish as Docker Public Preview Public Preview Public Preview Not supported Not supported
Azure App Service on Linux N/A Public Preview GA GA Not supported
Azure Functions - basic GA, OnBD* GA, OnBD* GA, OnBD* GA, OnBD* GA, OnBD*
Azure Functions - dependencies Not supported Not supported Public Preview Not supported Through extension
Azure Spring Cloud Not supported Not supported GA Not supported Not supported
Azure Kubernetes Service (AKS) N/A Not supported Through agent Not supported Not supported
Azure VMs Windows Public Preview Public Preview Through agent Not supported Not supported
On-Premises VMs Windows GA, opt-in Public Preview Through agent Not supported Not supported
Standalone agent - any env. Not supported Not supported GA Not supported Not supported

*OnBD is short for On by Default - the Application Insights will be enabled automatically once you deploy your app in supported environments.

Azure App Service


Application monitoring on Azure App Service on Windows is available for ASP.NET (enabled by default), ASP.NET Core, Java (in public preview), and Node.js applications. To monitor a Python app, add the SDK to your code.


Application monitoring for apps on Windows Containers on App Service is in public preview for .NET Core, .NET Framework, and Java.


You can enable monitoring for Java, Node.js, and ASP.NET Core(Preview) apps running on Linux in App Service through the portal.

For Python, use the SDK.

Azure Functions

The basic monitoring for Azure Functions is enabled by default to collect log, performance, error data, and HTTP requests. For Java applications, you can enable richer monitoring with distributed tracing and get the end-to-end transaction details. This functionality for Java is in public preview for Windows and you can enable it in Azure portal.

Azure Spring Cloud


Application monitoring for Java apps running in Azure Spring Cloud is integrated into the portal, you can enable Application Insights directly from the Azure portal, both for the existing and newly created Azure Spring Cloud resources.

Azure Kubernetes Service (AKS)

Codeless instrumentation of Azure Kubernetes Service (AKS) is currently available for Java applications through the standalone agent.

Azure Windows VMs and virtual machine scale set

Auto-instrumentation for Azure VMs and virtual machine scale set is available for .NET and Java - this experience isn't integrated into the portal. The monitoring is enabled through a few steps with a stand-alone solution and doesn't require any code changes.

On-premises servers

You can easily enable monitoring for your on-premises Windows servers for .NET applications and for Java apps.

Other environments

The versatile Java standalone agent works on any environment, there's no need to instrument your code. Follow the guide to enable Application Insights and read about the amazing capabilities of the Java agent. The agent is in public preview and available on all regions.

Next steps