New to Claude Skills? Learn how to install them →

microsoft on GitHub

App Insights Instrumentation

OfficialFree

Guidance for instrumenting web apps with Azure Application Insights.

by microsoft1.4k stars on microsoft/azure-skills
4 views
Updated Aug 10, 2026
Get this skill

Free · Opens the source repo

What App Insights Instrumentation does

The App Insights Instrumentation skill provides developers with essential guidance and reference materials for integrating Azure Application Insights into their web applications. This skill is particularly useful for understanding how to instrument applications effectively, ensuring that developers can monitor and analyze application performance with telemetry data. It covers various programming languages and frameworks, including ASP.NET Core, Node.js, and Python, offering tailored instructions and best practices for each.

Users can expect to find detailed SDK setup instructions, telemetry patterns, and examples that illustrate how to implement Application Insights. The skill emphasizes the importance of collecting context information about the application, such as its programming language and hosting environment, to provide accurate guidance. It also encourages the use of auto-instrumentation where applicable, particularly for ASP.NET Core applications hosted in Azure App Services, simplifying the setup process for developers.

For those looking to manually instrument their applications, the skill provides step-by-step instructions for creating the necessary Application Insights resources, modifying application code, and utilizing various SDKs. Additionally, it includes quick references for OpenTelemetry distributions and exporters, making it easier for developers to implement observability in their applications. Overall, this skill is an invaluable resource for developers aiming to enhance their application's monitoring capabilities with Azure Application Insights.

When to use it

Use this skill when you need guidance on how to instrument a web application or set up the Application Insights SDK.

When not to use it

Do not use this skill when you need to modify your project to add telemetry; in such cases, use the azure-prepare skill instead.

What you can build with it

Setting Up Telemetry for a New ASP.NET Core App

You are developing a new ASP.NET Core application and want to implement Azure Application Insights for monitoring. Use this skill to get step-by-step guidance on SDK setup and telemetry patterns.

Understanding Application Insights Concepts

You are new to Azure Application Insights and need to understand its core concepts and how to instrument your applications. This skill provides the foundational knowledge and references you need.

Modifying an Existing Node.js App for Monitoring

You have an existing Node.js application hosted in Azure and want to add monitoring capabilities. This skill will guide you through the necessary code modifications and resource creation.

How to install App Insights Instrumentation

View source

1. Install with the skills CLI

npx skills add microsoft/azure-skills/appinsights-instrumentation --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by microsoft

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
  • 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 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

Platform-Specific Guides

Frequently asked questions about App Insights Instrumentation

Similar skills