Chuyển đến nội dung
Skillpedia
Triển khai và đám mây (DevOps)40k · #7052

appinsights-instrumentation

Skill này làm gì

Công cụ này giúp thêm hệ thống giám sát vào ứng dụng web của bạn. Nó gửi thông tin về hiệu năng và tình trạng ứng dụng đến Azure App Insights, cho phép bạn xem ứng dụng đang chạy ra sao.

Khi nào nên dùng

  • ✓Khi bạn muốn giám sát hiệu năng của website.
  • ✓Khi bạn cần biết ứng dụng có đang hoạt động đúng không.
  • ✓Khi bạn muốn nhận cảnh báo về sự cố trong ứng dụng.

Liên kết skill

https://github.com/github/awesome-copilot/blob/main/skills/appinsights-instrumentation/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/github/awesome-copilot/blob/main/skills/appinsights-instrumentation/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Thêm giám sát vào ứng dụng web Node.js của tôi đang được lưu trữ trên Azure.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Công cụ trước tiên kiểm tra loại ứng dụng và nơi nó được lưu trữ. Sau đó, nó có thể thử thiết lập giám sát tự động hoặc hướng dẫn bạn làm thủ công bằng cách thêm giám sát vào mã ứng dụng hoặc dùng công cụ của Azure.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

AppInsights instrumentation

This skill enables sending telemetry data of a webapp to Azure App Insights for better observability of the app's health.

When to use this skill

Use this skill when the user wants to enable telemetry for their webapp.

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.
Câu hỏi thường gặp

Azure App Insights là gì?

Đó là dịch vụ của Azure thu thập dữ liệu telemetry (thông tin về hiệu năng và sử dụng) từ ứng dụng để giúp giám sát tình trạng và phát hiện sự cố.

Ứng dụng của tôi có cần được lưu trữ trên Azure không?

Có, tính năng này dành cho các ứng dụng web đã được lưu trữ trên Azure, như ASP.NET Core hoặc Node.js.

Làm sao để biết ứng dụng của tôi dùng ngôn ngữ nào?

Công cụ sẽ cố gắng xác định, nhưng bạn có thể cần cho nó biết nếu ứng dụng được xây bằng C# (cho ASP.NET Core), JavaScript/TypeScript (cho Node.js) hoặc Python.

Chi tiết

Mô tả gốc của tác giả

Instrument a webapp to send useful telemetry data to Azure App Insights

repo: github/awesome-copilot

Độ phổ biến

Sao GitHub
40k
Vị trí xếp hạng
#7052
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự