The App Service and Application Insights team are happy to announce the Public Preview of Application Insights Auto-Instrumentation for Node.js on Windows Container web applications! You can monitor your applications with Application Insights Auto-Instrumentation without changing your code. When enabled, the App Service platform will configure and attach the agent to the application in your container. You can start seeing data such as requests, logs, and traces in your Application Insights resource. You can analyze the data and set up alerts within the Application Insights resource.
Auto-Instrumentation for Windows Containers on App Service now supports web applications running .NET, Java, and Node.js.
Enable Auto-Instrumentation
You can enable Auto-Instrumentation from App Service's web app create blade or from the Application Insights blade of your web app resource.
App Service Web App Create Blade
To create a new Node.js Windows Container web application with App Insights auto-instrumentation enabled:
- Go to Azure Portal and open the create web app blade
- Fill out the required fields in the “Basics” tab, though be sure to select the following:
- Publish: Docker Container
- Operating System: Windows
- Go to the “Monitoring” tab, and select “Yes” to enable Application Insights
- Go to “Review + Create” and click “Create”
Once your container is deployed, Application Insights will automatically attach and will be ready to send logs, metrics, and traces to the Application Insights resource.
Application Insights Blade
If you already have a pre-existing Windows Container Node.js web app and would like to enable Application Insights auto-instrumentation:
- Go to Azure Portal, find and navigate to your web app's management page
- Select the “Application Insights (preview)” menu item
- Click on “Turn on Application Insights” button
- Create a new Application Insights resource or use a pre-existing resource. It’s recommended to have the resource in the same region as the web app.
- Click "Apply" to save your changes
Enabling App Insights will cause your web app to restart. Once restarts finishes, App Insights will automatically start sending logs, metrics, and traces to your App Insights resource.