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
- ยน: Application Insights is on by default and enabled automatically.
- ยฒ: This feature is in public preview. See Supplemental Terms of Use for Microsoft Azure Previews.
- ยณ: An agent must be deployed and configured.
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
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for