Source: microsoft/azure-skills · Maintainer: Microsoft · License: MIT · Checked: 26 October 2026
What is the appinsights-instrumentation skill?
The appinsights-instrumentation skill is Microsoft's guide for adding Azure Application Insights telemetry to a web app, written for coding agents. It tells the agent how to find out what kind of app it is looking at, when the portal can instrument it with no code changes, how to create the App Insights resource, and which Azure Monitor OpenTelemetry package to wire into ASP.NET Core, Node.js or Python code.
Its description reads: "Guidance for instrumenting webapps with Azure Application Insights. Provides telemetry patterns, SDK setup, and configuration references." Its trigger list includes "how to instrument app", "App Insights SDK" and "APM best practices".
The skill ships in microsoft/azure-skills, the Azure Skills Plugin, under "Troubleshoot, monitor, and govern" in the README. The SKILL.md frontmatter lists version 1.2.2 and author Microsoft, and the folder carries its own MIT LICENSE.txt.
As of 26 October 2026, its skills.sh page listed about 565,900 installs (snapshot, 26 October 2026).
What does it do?
The SKILL.md is a decision guide backed by small reference files.
It knows its role. A banner near the top says: "If the user wants to add App Insights to their app, invoke azure-prepare instead." The skill answers how-to questions and feeds azure-prepare during its research phase; azure-prepare makes the project changes.
It collects context first. The agent works out the language, framework and hosting of the app from the source, and the skill adds: "You must always ask the user where the application is hosted".
It prefers auto-instrumentation. For a C# ASP.NET Core app on Azure App Service, the agent uses references/auto.md, which builds a link to the app's monitoring settings blade in the Azure portal so you can turn on Application Insights without code changes. Microsoft documents this in its autoinstrumentation overview.
Otherwise it instruments manually, in two parts.
Create the resource with one of two options:
- Add the snippet in
examples/appinsights.bicepto an existing Bicep template. It creates a Log Analytics workspace (PerGB2018, 30-day retention) and a workspace-based Application Insights component, and outputs the connection string. - Or run the Azure CLI steps in
scripts/appinsights.ps1: add theapplication-insightsextension, create the workspace, create the component, then query its connection string.
Then change the code:
| App | Package | What the guide adds |
|---|---|---|
| ASP.NET Core | Azure.Monitor.OpenTelemetry.AspNetCore |
builder.Services.AddOpenTelemetry().UseAzureMonitor(); before builder.Build() |
| Node.js | @azure/monitor-opentelemetry |
useAzureMonitor() at the top of the main entry file, after env vars load |
| Python | azure-monitor-opentelemetry |
configure_azure_monitor() with a named logger |
In every case the app reads APPLICATIONINSIGHTS_CONNECTION_STRING from its environment. The guides say to put that variable in your Bicep or Terraform if you have it, and otherwise set it with az webapp config appsettings set, az containerapp update or az functionapp config appsettings set. The ASP.NET Core guide adds: "Don't modify appsettings.json. It was a deprecated way to configure App Insights."
Container Apps get a longer guide. references/container-apps.md covers environment-level Log Analytics, the console and system log tables, built-in metrics such as Replicas, Requests and RestartCount, storing the connection string as a container app secret, and distributed tracing across services with one shared App Insights resource.
For the underlying Microsoft docs, see enable Azure Monitor OpenTelemetry.
How do you install the appinsights-instrumentation skill?
The repo README documents these routes. Install the full plugin if you plan to let the agent change your project, since this skill hands that work to azure-prepare.
Claude Code: the Azure Skills Plugin. Run inside Claude Code:
/plugin install azure@claude-plugins-official
Or run /plugin and search for "azure". See Claude Code plugins.
GitHub Copilot CLI:
/plugin marketplace add microsoft/azure-skills
/plugin install azure@azure-skills
Codex and Cursor. The README says to run codex plugin marketplace add microsoft/azure-skills, then install azure from /plugins; for Cursor, use the Cursor Marketplace or Settings, then Plugins. See Codex skills and Cursor skills.
Skill only. The command on skills.sh:
npx skills add https://github.com/microsoft/azure-skills --skill appinsights-instrumentation
Add azure-prepare the same way if you copy single skills, so the hand-off has somewhere to go.
Prerequisites, per the README: an Azure subscription, Node.js 18 or later for npx, and the Azure CLI signed in with az login.
How do you use it?
Ask how to instrument, or ask about App Insights concepts. Requests to change the project route to azure-prepare.
Example prompts (suggestions, not quotes from the repo):
How do I instrument this Express app on App Service with Application Insights?What is the difference between auto-instrumentation and the OpenTelemetry distro for my ASP.NET Core app?Show me the Bicep I need to add Application Insights to our existing template.Our container apps send logs but no request traces. What's missing?Add Application Insights to this Python API.(expect a hand-off to azure-prepare)
Expect the agent to ask where the app is hosted before it suggests anything.
Tips and limits
From the repo and skills.sh, not from testing:
- Code changes need a redeploy. Each language guide notes that the app must be deployed again for telemetry to start.
- Call the setup early. The Node.js guide says to call
useAzureMonitor()as early as possible, but after environment variables load, because it reads the connection string from the environment. - Auto-instrument coverage differs by file. The SKILL.md sends only C# ASP.NET Core on App Service to the auto guide, while
auto.mdlists both ASP.NET Core and Node.js on App Service. Microsoft's autoinstrumentation overview also lists Java on App Service, and Python on App Service for Linux when published as code. - It creates billable resources. Both the Bicep snippet and the CLI script create a Log Analytics workspace and an Application Insights component in your subscription.
- Security audits. On skills.sh, Gen Agent Trust Hub (Safe), Socket and Snyk all rated it Pass on 7 October 2026.
The MIT License lets you copy and change the skill as long as you keep Microsoft's copyright and license notices.
Save it in your Kipt library
If your team has a standard setup, such as a fixed resource group, sampling settings or a logger name, an edited copy keeps it in front of the agent. In Kipt, open Skills and paste the skill's GitHub folder link into the import box, or drop the folder or a .zip; the Bicep and script files come along. Skills in your private GitHub repo install into Claude Code or Codex with one command:
npx skills add https://github.com/<you>/<repo>.git --all -g
Kipt is not affiliated with Microsoft.
Similar skills
- Azure prepare skill: makes the project changes this skill describes, as part of an azd deployment plan.
- Azure diagnostics skill: uses Azure Monitor and App Insights data to troubleshoot production issues.
- Azure compliance skill: flags resources with no diagnostic settings, among other findings.
- Sentry skill: covers Sentry's getsentry/skills collection and points to sentry-for-ai, Sentry's repo for SDK setup and instrumentation.
- Google agents CLI observability skill: tracing and logging for agents built with Google's ADK.