appinsights-instrumentation

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.

npx skills add https://github.com/microsoft/azure-skills --skill appinsights-instrumentation

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

Mehr Skills von microsoft

oss-growth
microsoft
OSS-Wachstums-Hacker-Persona
official
microsoft-foundry
microsoft
Foundry-Agenten end-to-end bereitstellen, evaluieren und verwalten: Docker-Build, ACR-Push, gehostete/Prompt-Agenten erstellen, Container starten, Batch-Evaluierung, kontinuierliche Evaluierung, Prompt-Optimizer-Workflows, agent.yaml, Datensatzkuration aus Traces. VERWENDUNG FÜR: Agent in Foundry bereitstellen, gehosteten Agenten, Agenten erstellen, Agenten aufrufen, Agenten evaluieren, Batch-Evaluierung ausführen, kontinuierliche Evaluierung, kontinuierliches Monitoring, Status der kontinuierlichen Evaluierung, Prompt optimieren, Prompt verbessern, Prompt-Optimizer, Agentenanweisungen optimieren, Agenten verbessern...
officialdevelopmentdevops
azure-ai
microsoft
Verwendung für Azure AI: Suche, Sprache, OpenAI, Dokumentenintelligenz. Hilft bei Suche, Vektor-/Hybridsuche, Sprach-zu-Text, Text-zu-Sprache, Transkription, OCR. WANN: KI-Suche, Abfragesuche, Vektorsuche, Hybridsuche, semantische Suche, Sprach-zu-Text, Text-zu-Sprache, Transkribieren, OCR, Text in Sprache umwandeln.
officialdevelopmentapi
azure-deploy
microsoft
Führen Sie Azure-Bereitstellungen für BEREITS VORBEREITETE Anwendungen aus, die vorhandene .azure/deployment-plan.md- und Infrastrukturdateien haben. Verwenden Sie diese Fähigkeit NICHT, wenn der Benutzer darum bittet, eine neue Anwendung zu ERSTELLEN – verwenden Sie stattdessen azure-prepare. Diese Fähigkeit führt azd up, azd deploy, terraform apply und az deployment-Befehle mit integrierter Fehlerbehebung aus. Erfordert .azure/deployment-plan.md von azure-prepare und validierten Status von azure-validate. WANN: "run azd up", "run azd deploy", "execute deployment",...
officialdevopsaws
azure-storage
microsoft
Azure Storage-Dienste, darunter Blob Storage, Dateifreigaben, Queue Storage, Table Storage und Data Lake. Beantwortet Fragen zu Speicherzugriffsebenen (heiß, kühl, kalt, Archiv), wann welche Ebene verwendet werden sollte, und zum Vergleich der Ebenen. Bietet Objektspeicher, SMB-Dateifreigaben, asynchrone Nachrichtenübermittlung, NoSQL-Schlüssel-Wert und Big-Data-Analysen. Beinhaltet Lebenszyklusverwaltung. VERWENDUNG FÜR: Blob-Speicher, Dateifreigaben, Queue-Speicher, Table-Speicher, Data Lake, Dateien hochladen, Blobs herunterladen, Speicherkonten, Zugriffsebenen,...
officialdevelopmentdatabase
azure-diagnostics
microsoft
Debuggen von Azure-Produktionsproblemen mit AppLens, Azure Monitor, Ressourcenintegrität und sicherer Triage. WANN: Debuggen von Produktionsproblemen, Fehlerbehebung bei App Service, hohe CPU-Auslastung im App Service, Fehler bei der App Service-Bereitstellung, Fehlerbehebung bei Container-Apps, Fehlerbehebung bei Functions, Fehlerbehebung bei AKS, kubectl kann keine Verbindung herstellen, kube-system/CoreDNS-Fehler, ausstehende Pods, Crashloop, Knoten nicht bereit, Upgrade-Fehler, Analyse von Protokollen, KQL, Einblicke, Fehler beim Image-Pull, Probleme mit Kaltstarts, Fehler bei Integritätsprüfungen,...
officialdevopsdevelopment
azure-prepare
microsoft
Bereiten Sie Azure-Apps für die Bereitstellung vor (Infra Bicep/Terraform, azure.yaml, Dockerfiles). Verwenden Sie für Erstellen/Modernisieren oder Erstellen+Bereitstellen; nicht für Cross-Cloud-Migration (verwenden Sie azure-cloud-migrate). NICHT VERWENDEN FÜR: Copilot-SDK-Apps (verwenden Sie azure-hosted-copilot-sdk). WANN: "App erstellen", "Web-App erstellen", "API erstellen", "serverlose HTTP-API erstellen", "Frontend erstellen", "Backend erstellen", "Dienst erstellen", "Anwendung modernisieren", "Anwendung aktualisieren", "Authentifizierung hinzufügen", "Caching hinzufügen", "auf Azure hosten", "erstellen und...
officialdevelopmentdevops
azure-validate
microsoft
Vor der Bereitstellung durchgeführte Validierung der Azure-Bereitschaft. Führen Sie umfassende Prüfungen der Konfiguration, Infrastruktur (Bicep oder Terraform), RBAC-Rollenzuweisungen, verwalteten Identitätsberechtigungen und Voraussetzungen durch, bevor Sie bereitstellen. WANN: meine App validieren, Bereitstellungsbereitschaft prüfen, Preflight-Prüfungen durchführen, Konfiguration verifizieren, prüfen, ob bereit zur Bereitstellung, azure.yaml validieren, Bicep validieren, vor der Bereitstellung testen, Bereitstellungsfehler beheben, Azure Functions validieren, Funktionen-App validieren, serverlos validieren...
officialdevopstesting