
Appinsights Instrumentation
Wire an ASP.NET Core or Node.js app on Azure to Application Insights so solo builders can see health and telemetry in production.
Overview
AppInsights instrumentation is an agent skill for the Operate phase that adds Azure Application Insights telemetry to ASP.NET Core or Node.js web apps hosted on Azure.
Install
npx skills add https://github.com/github/awesome-copilot --skill appinsights-instrumentationWhat is this skill?
- Collects a (language, framework, hosting) tuple before instrumenting and asks where the app runs (local, App Service cod
- Prefers AUTO instrumentation for C# ASP.NET Core on Azure App Service via the bundled AUTO reference guide.
- Supports manual path: create the App Insights resource (including Bicep options) and update application code.
- Limited to ASP.NET Core or Node.js workloads hosted in Azure per skill prerequisites.
Adoption & trust: 9.3k installs on skills.sh; 34.6k GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
Your Azure web app runs blind—you lack structured telemetry and cannot reliably judge health or failures in production.
Who is it for?
Indie builders with an ASP.NET Core or Node.js app on Azure App Service or related Azure hosting who want observability without reading every SDK doc first.
Skip if: Static sites, non-Azure hosts, or stacks outside ASP.NET Core/Node.js on Azure called out in the skill prerequisites.
When should I use this skill?
Use when the user wants to enable telemetry for their webapp.
What do I get? / Deliverables
After the skill runs, the app sends useful telemetry to Application Insights with the right auto or manual instrumentation path for your hosting model.
- Confirmed instrumentation strategy (auto vs manual)
- Application Insights resource configuration
- Updated application code or hosting config for telemetry emission
Recommended Skills
Journey fit
Telemetry and observability are canonical Operate work—this skill targets apps already headed to or running on Azure, not greenfield ideation. Monitoring is the right shelf because the outcome is App Insights ingestion and app health visibility, not deploy automation alone.
How it compares
Azure-focused instrumentation playbook for agent-assisted setup—not a third-party APM product or generic console-logging pass.
Common Questions / FAQ
Who is appinsights-instrumentation for?
Solo and small-team builders shipping ASP.NET Core or Node.js apps on Azure who want Application Insights wired correctly via auto-instrument or manual resource + code changes.
When should I use appinsights-instrumentation?
Use it in Operate when you need monitoring visibility, and during late Ship prep if you are hardening Azure hosting before launch—whenever you want to enable telemetry for a qualifying Azure webapp.
Is appinsights-instrumentation safe to install?
It guides Azure resource changes and code edits that touch production telemetry; review the Security Audits panel on this page and validate Bicep or portal changes in a non-production slot first.
SKILL.md
READMESKILL.md - Appinsights Instrumentation
# AppInsights instrumentation This skill enables sending telemetry data of a webapp to Azure App Insights for better observability of the app's health. ## When to use this skill Use this skill when the user wants to enable telemetry for their webapp. ## Prerequisites The app in the workspace must be one of these kinds - An ASP.NET Core app hosted in Azure - A Node.js app hosted in Azure ## Guidelines ### Collect context information Find out the (programming language, application framework, hosting) tuple of the application the user is trying to add telemetry support in. This determines how the application can be instrumented. Read the source code to make an educated guess. Confirm with the user on anything you don't know. You must always ask the user where the application is hosted (e.g. on a personal computer, in an Azure App Service as code, in an Azure App Service as container, in an Azure Container App, etc.). ### Prefer auto-instrument if possible If the app is a C# ASP.NET Core app hosted in Azure App Service, use [AUTO guide](references/AUTO.md) to help user auto-instrument the app. ### Manually instrument Manually instrument the app by creating the AppInsights resource and update the app's code. #### Create AppInsights resource Use one of the following options that fits the environment. - Add AppInsights to existing Bicep template. See [examples/appinsights.bicep](examples/appinsights.bicep) for what to add. This is the best option if there are existing Bicep template files in the workspace. - Use Azure CLI. See [scripts/appinsights.ps1](scripts/appinsights.ps1) for what Azure CLI command to execute to create the App Insights resource. No matter which option you choose, recommend the user to create the App Insights resource in a meaningful resource group that makes managing resources easier. A good candidate will be the same resource group that contains the resources for the hosted app in Azure. #### Modify application code - If the app is an ASP.NET Core app, see [ASPNETCORE guide](references/ASPNETCORE.md) for how to modify the C# code. - If the app is a Node.js app, see [NODEJS guide](references/NODEJS.md) for how to modify the JavaScript/TypeScript code. - If the app is a Python app, see [PYTHON guide](references/PYTHON.md) for how to modify the Python code. MIT License Copyright 2025 (c) Microsoft Corporation. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE ## Modify code Make these necessary changes to the app. - Install client library ``` pip install azure-monitor-opentelemetry ``` - Configure the app to use Azure Monitor Python applications send telemetry via the logger class in Python standard library. Create a module that configures and creates a logger that can send telemetry. ```python import logging from azure.monitor.opentelemetry import configure_azure_monitor configure_azure_monitor( l