appinsights-instrumentation
Guidance for instrumenting webapps with Azure Application Insights. Provides telemetry patterns, SDK setup, and configuration references. WHEN: how to instrument app, App Insights SDK, telemetry patterns, what is App Insights, Application Insights guidance, instrumentation examples, APM best practices.
Install command
Run on your own machine to install this skill.
npx skills add https://github.com/microsoft/azure-skills --skill appinsights-instrumentation
Use this in your own environment. Copying text here does not run it.
How to use it
- Run the install command in your project folder.
- Restart your AI client so it picks up the skill.
- Ask for a task that matches the description to try it.
SKILL.md
The instructions your assistant reads, from microsoft/azure-skills/skills/appinsights-instrumentation/SKILL.md. Its authors wrote it, so read it before you install.
name: appinsights-instrumentation description: "Guidance for instrumenting webapps with Azure Application Insights. Provides telemetry patterns, SDK setup, and configuration references. WHEN: how to instrument app, App Insights SDK, telemetry patterns, what is App Insights, Application Insights guidance, instrumentation examples, APM best practices." license: MIT metadata: author: Microsoft version: "1.2.2"
AppInsights Instrumentation Guide
This skill provides guidance and reference material for instrumenting webapps with Azure Application Insights.
⛔ ADDING COMPONENTS?
If the user wants to add App Insights to their app, invoke azure-prepare instead. This skill provides reference material—azure-prepare orchestrates the actual changes.
When to Use This Skill
- User asks how to instrument (guidance, patterns, examples)
- User needs SDK setup instructions
- azure-prepare invokes this skill during research phase
- User wants to understand App Insights concepts
When to Use azure-prepare Instead
- User says "add telemetry to my app"
- User says "add App Insights"
- User wants to modify their project
- Any request to change/add components
Prerequisites
The app in the workspace must be one of these kinds
- An ASP.NET Core app hosted in Azure
- An Azure Container App
- A Node.js app hosted in Azure
- A Python 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 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 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 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 for how to modify the C# code.
- If the app is a Node.js app, see NODEJS guide for how to modify the JavaScript/TypeScript code.
- If the app is a Python app, see PYTHON guide for how to modify the Python code.
SDK Quick References
- OpenTelemetry Distro: Python | TypeScript
- OpenTelemetry Exporter: Python | Java
Platform-Specific Guides
- Container Apps: Observability Guide
Security checks
Automated checks, last run Nov 23, 2026. They can miss problems and do not guarantee a listing is safe. Read the source and what you are asked to run before you use it.
6 of 6 checks passed
- PassedSetup commands and descriptionLayer 1
The install commands and description match none of the risky patterns we look for.
Source: AIWantsThis screening rules
- PassedSkill instructions (SKILL.md)Layer 1
The skill file shows no hidden text, no instruction-override phrases and no risky commands.
Source: AIWantsThis screening rules
- PassedGen Agent Trust Hub auditLayer 2
Gen Agent Trust Hub reported a pass for this skill.
Evidence (1)
- Risk level
- SAFE
- PassedSnyk auditLayer 2
Snyk reported a pass for this skill.
Evidence (2)
- Risk level
- LOW
- Audited
- Oct 7, 2026
Source: Snyk, as shown on skills.sh
- PassedSocket auditLayer 2
Socket reported a pass for this skill.
Evidence (1)
- Audited
- Oct 7, 2026
Source: Socket, as shown on skills.sh
- PassedSource repositoryLayer 2
The repository is public, not archived and has recent activity.
Evidence (3)
- Last push
- 2026-11-20
- Archived
- no
- License
- MIT
Source: GitHub