THE MEDIA FOR AI THAT ACTUALLY HELPS.English edition · Understand & take action
Microsoft

Instrument a web application with Application Insights

appinsights-instrumentation

In brief

This skill provides a guide and references to instrument a web application with Azure Application Insights: telemetry diagrams, kit setups, and configuration points. It answers the method questions (how to instrument, which patterns, what is Application Insights) and can be called during the search phase of deazure-preparation. On the other hand, if the user wants to add Application Insights or telemetry to his project, or change the components concretely, the SKILL.md requires to go through azure-preparation, which orchestrates the changes. Here, we remain on accompanying documentation, not on the editing of the project.

What it does

  • Helpful for SDK instructions, instrumentation examples and good practices fromAPM around the app insights.
  • Returns to azure-preparation as soon as the request consists of adding the service, installing telemetry in the application, or touching the components.
  • S
  • Do not replace a low level OpenTelemetry exporter or Log Analytics query client: it speaks of applicative instrumentation.

Who it is for, and an example

Developers who want to understand how to cable App Insights before (or during) a modification orchestrated elsewhere.

Example request: A team asks "how to instrument our API with App Insights": the skill sets the patterns and settings, then hands to azure-prepare if it is really necessary to modify the project.

When talking about guidance App Insights, SDK, telemetry patterns or instrumentation examples, without asking to add the component right away. Example written by iadujour.fr from the SKILL.md, not tested.

Install

npx skills add microsoft/skills (selection of the skill in the assistant, README).

npx skills add microsoft/skills

Works with

  • GitHub Copilot
  • Copilot CLI

Source: README: examples of Copilot CLI and GitHub Copilot in VS Code; installation `npx skills add` sends files to the chosen agent directory, without an exhaustive list.

Level: Intermediate

Suppose a publisher's project and mastery of the corresponding SDK or CLI.

Good to know

Official Microsoft deposit; README presents it as an ongoing work (skills and tests still enriched).

SKILL.md excerpt

The original description, which the agent reads to decide whether to load the skill (in English):

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.

Quoted from SKILL.md at commit b2f2284 . The folder also contains 11 extra files (examples/, references/, scripts/).

The SKILL.md has 69 lines and 11 main sections:

  • When to Use This Skill
  • When to Use azure-prepare Instead
  • Prerequisites
  • Guidelines
  • Collect context information
  • Prefer auto-instrument if possible
  • Manually instrument
  • Create AppInsights resource
  • Modify application code
  • SDK Quick References
  • Platform-Specific Guides

Licence: MIT

Checked on 10 November 2026 : licence file in the skill folder . Licence declared in the frontmatter: “MIT”. Rights holder: Copyright 2025 (c) Microsoft Corporation..

The licence allows reuse: the full SKILL.md text is reproduced below, unmodified, with its licence notice.

Full SKILL.md text

Reproduced unmodified from microsoft/skills (commit b2f2284) , © Microsoft, under licence MIT (original licence file ).

Show the original SKILL.md (69 lines, in English)
---
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](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.

## SDK Quick References

- **OpenTelemetry Distro**: [Python](references/sdk/azure-monitor-opentelemetry-py.md) | [TypeScript](references/sdk/azure-monitor-opentelemetry-ts.md)
- **OpenTelemetry Exporter**: [Python](references/sdk/azure-monitor-opentelemetry-exporter-py.md) | [Java](references/sdk/azure-monitor-opentelemetry-exporter-java.md)

## Platform-Specific Guides

- **Container Apps**: [Observability Guide](references/container-apps.md)
Source. Card written by iadujour.fr from: Frontmatter, sections and body of the deposit. Checked on 10 November 2026. microsoft/skills .

In the directory

Use cases and guides that share a theme, industry or tool with this skill.

IN THE DIRECTORY

Related use cases.

Directory cards that share at least two precise keywords with this skill.

Customer support

Beauty advisor 24/7 in the application, with latency within 5 seconds

L'Oréal Paris has launched Beauty Genius, conversational assistant on Azure OpenAI (GPT-4o and RAG Ada), available 24 hours a day, maximum latency announced less than 5 seconds worldwide.

Tool: Beauty Genius (Azure OpenAI, GPT-4o, RAG Ada)Type: Spotted
Customer support

Answer frequently asked questions in e-commerce email

The Redoute put into production in the fall of 2024 a conversational agent who deals with the frequent questions in the messaging of its application; the advisers then intervene in escalation.

Tool: Azure OpenAIType: Spotted
SAME PUBLISHER

Other Microsoft skills: Observability and monitoring

Whole category
MicrosoftObservability and monitoring

Enable Application Insights in one line, with self-instrument, in Python

azure-monitor-opentelemetry-py

For a Python application, this skill sets Application Insights via the Azure Monitor OpenTelemetry distribution: a call to configure azure monitor and self-instrument of current libraries, rather than a hand-connected exporter.

Tools: GitHub Copilot, Copilot CLILevel: Intermediateupdated 28/07/2026
MicrosoftObservability and monitoring

Send custom logs to Log Analytics in Python

azure-monitor-ingestion-py

With LogsIngestionClient, the SDK Azure Monitor Ingestion for Python sends custom logs to a Log Analytics workspace via the API Logs Ingestion.

Tools: GitHub Copilot, Copilot CLILevel: Intermediateupdated 15/07/2026
MicrosoftObservability and monitoring

Export OpenTelemetry to Low Level Application Insights in Python

azure-monitor-opentelemetry-exporter-py

This skill describes the exporter OpenTelemetry Azure Monitor for Python, the low level: AzureMonitorTraceExporter, AzureMonitorMetricExporter and AzureMonitorLogExporter, to send traces, metrics and logs to Application Insights when you assemble the OpenTelemetry supplier yourself.

Tools: GitHub Copilot, Copilot CLILevel: Intermediateupdated 15/07/2026
DISCUSSION

Comments.

A field note, a question, a precision on this skill? Comments are reviewed before publication.

Published comments

Loading comments…

    Leave a comment

    Moderation charter. Every comment is reviewed before publication. We refuse hate speech, insulting or discriminatory language, advertising, spam and promotional links, off-topic posts and other people’s personal data.