appinsights-instrumentation

Panduan untuk menginstrumentasi aplikasi web dengan Azure Application Insights. Menyediakan pola telemetri, pengaturan SDK, dan referensi konfigurasi. KAPAN: cara menginstrumentasi aplikasi, SDK App Insights, pola telemetri, apa itu App Insights, panduan Application Insights, contoh instrumentasi, praktik terbaik APM.

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

Lebih banyak skill dari microsoft

oss-growth
microsoft
Persona peretas pertumbuhan OSS
official
microsoft-foundry
microsoft
Menyebarkan, mengevaluasi, dan mengelola agen Foundry secara menyeluruh: pembuatan Docker, push ACR, pembuatan agen yang dihosting/dengan prompt, memulai kontainer, evaluasi batch, evaluasi berkelanjutan, alur kerja pengoptimal prompt, agent.yaml, kurasi kumpulan data dari jejak. GUNAKAN UNTUK: menyebarkan agen ke Foundry, agen yang dihosting, membuat agen, memanggil agen, mengevaluasi agen, menjalankan evaluasi batch, evaluasi berkelanjutan, pemantauan berkelanjutan, status evaluasi berkelanjutan, mengoptimalkan prompt, meningkatkan prompt, pengoptimal prompt, mengoptimalkan instruksi agen, meningkatkan agen...
officialdevelopmentdevops
azure-ai
microsoft
Gunakan untuk Azure AI: Search, Speech, OpenAI, Document Intelligence. Membantu pencarian, pencarian vektor/hibrida, ucapan-ke-teks, teks-ke-ucapan, transkripsi, OCR. KAPAN: AI Search, pencarian kueri, pencarian vektor, pencarian hibrida, pencarian semantik, ucapan-ke-teks, teks-ke-ucapan, transkripsi, OCR, konversi teks ke ucapan.
officialdevelopmentapi
azure-deploy
microsoft
Jalankan deployment Azure untuk aplikasi yang SUDAH DISIAPKAN dan memiliki file .azure/deployment-plan.md serta infrastruktur yang sudah ada. JANGAN gunakan skill ini saat pengguna meminta untuk MEMBUAT aplikasi baru — gunakan azure-prepare sebagai gantinya. Skill ini menjalankan perintah azd up, azd deploy, terraform apply, dan az deployment dengan pemulihan kesalahan bawaan. Membutuhkan .azure/deployment-plan.md dari azure-prepare dan status tervalidasi dari azure-validate. KAPAN: "jalankan azd up", "jalankan azd deploy", "jalankan deployment",...
officialdevopsaws
azure-storage
microsoft
Layanan Azure Storage termasuk Blob Storage, File Shares, Queue Storage, Table Storage, dan Data Lake. Menjawab pertanyaan tentang tingkat akses penyimpanan (hot, cool, cold, archive), kapan menggunakan setiap tingkat, dan perbandingan tingkat. Menyediakan penyimpanan objek, berbagi file SMB, pengiriman pesan asinkron, NoSQL key-value, dan analitik big data. Termasuk manajemen siklus hidup. GUNAKAN UNTUK: blob storage, file shares, queue storage, table storage, data lake, unggah file, unduh blob, akun penyimpanan, tingkat akses,...
officialdevelopmentdatabase
azure-diagnostics
microsoft
Debug masalah produksi Azure menggunakan AppLens, Azure Monitor, resource health, dan triase aman. KAPAN: debug masalah produksi, troubleshoot app service, CPU tinggi app service, kegagalan deployment app service, troubleshoot container apps, troubleshoot functions, troubleshoot AKS, kubectl tidak bisa terhubung, kegagalan kube-system/CoreDNS, pod pending, crashloop, node tidak siap, kegagalan upgrade, analisis log, KQL, insights, kegagalan image pull, masalah cold start, kegagalan health probe,...
officialdevopsdevelopment
azure-prepare
microsoft
Siapkan aplikasi Azure untuk deployment (infra Bicep/Terraform, azure.yaml, Dockerfiles). Gunakan untuk membuat/memodernisasi atau membuat+men-deploy; bukan untuk migrasi lintas-cloud (gunakan azure-cloud-migrate). JANGAN GUNAKAN UNTUK: aplikasi copilot-sdk (gunakan azure-hosted-copilot-sdk). KAPAN: "membuat aplikasi", "membangun aplikasi web", "membuat API", "membuat API HTTP serverless", "membuat frontend", "membuat backend", "membangun layanan", "memodernisasi aplikasi", "memperbarui aplikasi", "menambahkan autentikasi", "menambahkan caching", "hosting di Azure", "membuat dan...
officialdevelopmentdevops
azure-validate
microsoft
Validasi pra-penyebaran untuk kesiapan Azure. Lakukan pemeriksaan mendalam pada konfigurasi, infrastruktur (Bicep atau Terraform), penetapan peran RBAC, izin identitas terkelola, dan prasyarat sebelum menyebarkan. KAPAN: validasi aplikasi saya, periksa kesiapan penyebaran, jalankan pemeriksaan awal, verifikasi konfigurasi, periksa apakah siap untuk menyebarkan, validasi azure.yaml, validasi Bicep, uji sebelum menyebarkan, pecahkan kesalahan penyebaran, validasi Azure Functions, validasi function app, validasi serverless...
officialdevopstesting