Index of every page on this site: llms.txt
All skills
microsoft avatar

/appinsights-instrumentation

@147c081 official
Run it yourself

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.

Use this Skill: https://skilld.dev/gh/microsoft/github-copilot-for-azure/appinsights-instrumentation

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈83 tokens for metadata: the name and description. ≈843 when used: this file. ≈4.4k more on demand in 10 files.

Description uses 4.2% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈333 characters, or 4.2%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

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

Platform-Specific Guides

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 alert1mo5 checks · Risk SAFE
  • Gen Agent Trust Hub1mo

    This skill provides comprehensive guidance for instrumenting web applications with Azure Application Insights. It follows security best practices by recommending official Azure SDKs and using secure methods for managing connection strings. No security considerations were identified.

  • Socket1mo

    No alerts

  • Snyk1mo

    Risk: LOW · No issues

  • Runlayer8mo

    9/12 files flagged

  • ZeroLeaks7mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 147c081. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 4 days ago.

Activeupdated 2 months ago
metadata
{
  "author": "Microsoft",
  "version": "0.0.0-placeholder"
}
  • application-insights
  • azure
  • instrumentation
  • telemetry
  • apm
  • aspnet-core
  • nodejs
  • observability

README badge

README badge for microsoft/github-copilot-for-azure/appinsights-instrumentation

Provides guidance for instrumenting webapps with Azure Application Insights, including SDK setup, telemetry patterns, and configuration references for ASP.NET Core and Node.js applications. Covers auto-instrumentation for App Service deployments, manual instrumentation via Bicep or Azure CLI, and SDK quick references for OpenTelemetry.

Generated from the current SKILL.md.

Does this skill actually add Application Insights to my app?
No. This skill provides guidance, patterns, and references. To actually add App Insights to your project, use the azure-prepare skill instead.
What languages and frameworks does this cover?
ASP.NET Core, Node.js, and Python apps hosted in Azure. The skill includes language-specific instrumentation guides for each.
Does this skill support auto-instrumentation?
Yes, but only for C# ASP.NET Core apps hosted in Azure App Service. For other setups, manual instrumentation is required.
What Azure hosting environments are supported?
The skill covers apps hosted in Azure App Service (code or container), Azure Container Apps, and includes specific guidance for Container Apps observability.
Can this skill help with OpenTelemetry SDKs?
Yes. The skill includes quick references for Azure Monitor OpenTelemetry Distro and Exporter for Python, TypeScript, and Java.

Generated from the current SKILL.md. These answers refresh after source changes.