Agent Skillsmicrosoft/azure-skills › appinsights-instrumentation

appinsights-instrumentation

GitHub

提供 Azure Application Insights 的 Web 应用监控指导,涵盖 SDK 配置、遥测模式及自动/手动集成示例。

.github/plugins/azure-skills/skills/appinsights-instrumentation/SKILL.md microsoft/azure-skills

Trigger Scenarios

询问如何为应用添加遥测或监控 需要 App Insights SDK 设置说明 查询 APM 最佳实践或概念

Install

npx skills add microsoft/azure-skills --skill appinsights-instrumentation -g -y
More Options

Non-standard path

npx skills add https://github.com/microsoft/azure-skills/tree/main/.github/plugins/azure-skills/skills/appinsights-instrumentation -g -y

Use without installing

npx skills use microsoft/azure-skills@appinsights-instrumentation

指定 Agent (Claude Code)

npx skills add microsoft/azure-skills --skill appinsights-instrumentation -a claude-code -g -y

安装 repo 全部 skill

npx skills add microsoft/azure-skills --all -g -y

预览 repo 内 skill

npx skills add microsoft/azure-skills --list

SKILL.md

Frontmatter
{
    "name": "appinsights-instrumentation",
    "license": "MIT",
    "metadata": {
        "author": "Microsoft",
        "version": "1.2.1"
    },
    "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."
}

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

Version History

  • ea76537 Current 2026-08-20 03:55
  • 013b97d 2026-07-25 09:43

Same Skill Collection

.github/plugins/azure-kusto-graph-skills/skills/azure-kusto-irql/SKILL.md
.github/plugins/azure-skills/skills/airunway-aks-setup/SKILL.md
.github/plugins/azure-skills/skills/azure-ai/SKILL.md
.github/plugins/azure-skills/skills/azure-aigateway/SKILL.md
.github/plugins/azure-skills/skills/azure-cloud-migrate/SKILL.md
.github/plugins/azure-skills/skills/azure-compliance/SKILL.md
.github/plugins/azure-skills/skills/azure-cost/SKILL.md
.github/plugins/azure-skills/skills/azure-kusto/SKILL.md
.github/plugins/azure-skills/skills/azure-quotas/SKILL.md
.github/plugins/azure-skills/skills/azure-resource-visualizer/SKILL.md
.github/plugins/azure-skills/skills/azure-upgrade/SKILL.md
.github/plugins/azure-skills/skills/entra-app-registration/SKILL.md
.github/plugins/azure-skills/skills/python-appservice-deploy/SKILL.md
skills/airunway-aks-setup/SKILL.md
skills/appinsights-instrumentation/SKILL.md
skills/azure-ai/SKILL.md
skills/azure-aigateway/SKILL.md
skills/azure-cloud-migrate/SKILL.md
skills/azure-compliance/SKILL.md
skills/azure-cost/SKILL.md
skills/azure-kubernetes/azure-kubernetes-automatic-readiness/SKILL.md
skills/azure-kusto/SKILL.md
skills/azure-quotas/SKILL.md
skills/azure-resource-visualizer/SKILL.md
skills/azure-upgrade/SKILL.md
skills/entra-app-registration/SKILL.md
skills/python-appservice-deploy/SKILL.md
.github/plugins/azure-kusto-graph-skills/skills/azure-kusto-graph/SKILL.md
.github/plugins/azure-kusto-graph-skills/skills/azure-kusto-irql-graph/SKILL.md
.github/plugins/azure-skills/skills/azure-app-onboard-prereq/SKILL.md
.github/plugins/azure-skills/skills/azure-app-onboard/SKILL.md
.github/plugins/azure-skills/skills/azure-compute/SKILL.md
.github/plugins/azure-skills/skills/azure-deploy/SKILL.md
.github/plugins/azure-skills/skills/azure-diagnostics/SKILL.md
.github/plugins/azure-skills/skills/azure-enterprise-infra-planner/SKILL.md
.github/plugins/azure-skills/skills/azure-kubernetes/SKILL.md
.github/plugins/azure-skills/skills/azure-messaging/SKILL.md
.github/plugins/azure-skills/skills/azure-prepare/SKILL.md
.github/plugins/azure-skills/skills/azure-reliability/SKILL.md
.github/plugins/azure-skills/skills/azure-resource-lookup/SKILL.md
.github/plugins/azure-skills/skills/azure-storage/SKILL.md
.github/plugins/azure-skills/skills/azure-validate/SKILL.md
.github/plugins/azure-skills/skills/entra-agent-id/SKILL.md
.github/plugins/azure-skills/skills/microsoft-foundry/SKILL.md
skills/azure-app-onboard-prereq/SKILL.md
skills/azure-app-onboard/SKILL.md
skills/azure-compute/SKILL.md
skills/azure-deploy/SKILL.md
skills/azure-diagnostics/SKILL.md

Metadata

Files
0
Version
ea76537
Hash
f46e9dd4
Indexed
2026-07-25 09:43

ホーム - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-22 07:26
浙ICP备14020137号-1 $お客様$