‹ 首页

appinsights-instrumentation

@boshi-xixixi · 收录于 5 天前 · 上游提交 2 个月前

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

适合你,如果需要在 Azure 上监控 Web 应用性能

/ 通过 npx 安装 校验哈希
npx oh-my-skill add boshi-xixixi/traeskill/appinsights-instrumentation
/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- boshi-xixixi/traeskill/appinsights-instrumentation
/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify boshi-xixixi/traeskill/appinsights-instrumentation
安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
254GitHub stars
~572最小装载
~2.1K含声明引用
~2.3K文本包总量
索引托管

怎么用

商店整理自技能原文 · 版本 9cf38e6 · 表述以原文为准
它做什么

Claude 会帮助你对 Web 应用进行插桩,向 Azure App Insights 发送遥测数据,以便监控应用健康状态。

什么时候触发

当用户要求为他们的 Web 应用启用遥测时触发。应用需为 ASP.NET Core 或 Node.js 并托管在 Azure 上。

装好后可以这样说
Claude 会指导自动或手动插桩。
Claude 会提供代码修改指南。
技能原文 SKILL.md作者撰写 · MIT · 9cf38e6

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](references/AUTO.md) 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](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](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](references/ASPNETCORE.md) for how to modify the C# code.
  • If the app is a Node.js app, see [NODEJS guide](references/NODEJS.md) for how to modify the JavaScript/TypeScript code.
  • If the app is a Python app, see [PYTHON guide](references/PYTHON.md) for how to modify the Python code.
按 MIT 许可原样转载,未经改动 · 在 GitHub 查看 →

评论

登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。