appinsights-instrumentation — команда для Claude Code: телеметрия
Подключает веб-приложение к Azure App Insights: команда сама разберётся в стеке проекта и добавит отправку телеметрии.
npx claude-code-templates@latest --command azure/appinsights-instrumentationЧто делает appinsights-instrumentation
Команда нужна, когда приложение уже живёт в Azure, а данных о его здоровье нет. Она определяет пару «язык и фреймворк» по исходникам, уточняет у вас, где именно хостится приложение, и дальше выбирает путь инструментирования.
Для C# ASP.NET Core в Azure App Service есть автоинструментирование — отдельный сценарий в references/AUTO.md. В остальных случаях команда создаёт ресурс App Insights и правит код: для ASP.NET Core это references/ASPNETCORE.md, для Node.js — references/NODEJS.md, для Python — references/PYTHON.md. Ресурс создаётся либо добавлением в существующий Bicep-шаблон (образец в examples/appinsights.bicep), либо через Azure CLI по скрипту scripts/appinsights.ps1.
Работает команда только с двумя типами приложений: ASP.NET Core или Node.js, размещёнными в Azure. Если у вас Python-приложение, готового пути для него в этом сценарии нет — это повод сначала проверить, подходит ли инструмент вообще. Инструменты ограничены Bash и Read, так что правки кода вы вносите сами по подсказкам из гайдов.
Какие задачи решает
- включить телеметрию в ASP.NET Core приложении на Azure App Service
- создать ресурс App Insights через Azure CLI или Bicep
- добавить отправку телеметрии в Node.js приложение
- определить стек и хостинг проекта перед инструментированием
- выбрать между автоинструментированием и ручной правкой кода
Примеры запросов агенту
- включи телеметрию в моём приложении через App Insights
- добавь App Insights в существующий Bicep-шаблон
- инструментируй Node.js приложение для отправки данных в Azure App Insights
Как установить appinsights-instrumentation
1Через claude-code-templates
npx claude-code-templates@latest --command azure/appinsights-instrumentation2Вручную: положить файлы
.claude/commands/appinsights-instrumentation.mdВызов — /appinsights-instrumentation. Для всех проектов — ~/.claude/commands/
Вручную: положить файлы
~/.codex/prompts/appinsights-instrumentation.mdВызов — /prompts:appinsights-instrumentation. В Codex этот формат помечен устаревшим, замена — скиллы
Вручную: положить файлы
.github/prompts/appinsights-instrumentation.prompt.mdВручную: положить файлы
.gemini/commands/appinsights-instrumentation.tomlGemini хранит команды в TOML: текст запроса — в поле prompt
Из того же набора205
Весь набор →Похожие
Вопросы о appinsights-instrumentation
Как установить appinsights-instrumentation в Claude?
Через шаблоны: npx claude-code-templates@latest --command azure/appinsights-instrumentation. Команда появится в .claude/commands/appinsights-instrumentation.md.
Что делает appinsights-instrumentation?
Подключает веб-приложение к Azure App Insights, чтобы были видны данные о здоровье приложения. Сначала выясняет язык, фреймворк и хостинг, потом либо инструментирует автоматически, либо создаёт ресурс и правит код.
С какими приложениями она работает?
С ASP.NET Core и Node.js, размещёнными в Azure. Для C# в Azure App Service есть автоинструментирование, для остальных случаев — ручная правка по гайдам.
Исходный текст
appinsights-instrumentation.md · MIT
--- allowed-tools: Bash, Read description: Instrument a webapp to send useful telemetry data to Azure App Insights --- # 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.
© davila7 · MIT · davila7/claude-code-templates