appinsights-instrumentation
إضافة تطبيق Application Insights التelemetry لتطبيقات Azure
提供逐步指导,用于使用 Azure Application Insights 检测 Web 应用,包括适用于 ASP.NET Core、Node.js 和 Python 应用的 SDK 设置、配置和遥测模式。
Télécharger le ZIP du skill
Importer dans Claude
Allez dans Paramètres → Capacités → Skills → Importer un skill
Activez et commencez à utiliser
Tester
Utilisation de "appinsights-instrumentation". How do I add App Insights to my Node.js app?
Résultat attendu:
- 安装 Azure Monitor 包:npm install @azure/monitor-opentelemetry
- 将此添加到您的主入口文件:const { useAzureMonitor } = require('@azure/monitor-opentelemetry');
- 在应用早期调用设置:useAzureMonitor();
- 设置连接字符串环境变量:APPLICATIONINSIGHTS_CONNECTION_STRING
Utilisation de "appinsights-instrumentation". What is the Bicep template to create Application Insights?
Résultat attendu:
- 创建 Log Analytics Workspace 资源
- 创建 kind: 'web' 的 Application Insights 资源
- 使用 WorkspaceResourceId 将其链接到工作区
- 输出连接字符串以用于您的应用配置
Audit de sécurité
SûrThis is an official Microsoft skill providing Azure Application Insights instrumentation guidance. All 49 static findings are false positives: weak crypto alerts triggered by Azure SKU names (PerGB2018) and API versions; backtick detections are markdown code blocks; path traversal alerts are relative markdown links; environment variable access is the Azure-recommended pattern for connection strings. No actual security risks identified.
Score de qualité
Ce que vous pouvez construire
DevOps 工程师向 Azure Web 应用添加监控
DevOps 工程师需要向在 Azure App Service 上运行的现有 ASP.NET Core 应用添加 Application Insights。该技能提供逐步的 SDK 设置和配置指导。
开发人员学习 App Insights 检测
开发人员想了解如何使用 OpenTelemetry 为 Azure Monitor 检测其 Node.js 应用。该技能提供快速入门指南和最佳实践。
需要 Azure 监控帮助的 Claude Code 用户
Claude Code 用户询问如何向其 Python 应用添加遥测。该技能提供特定于 Python 的 SDK 配置和连接字符串设置说明。
Essayez ces prompts
How do I add Application Insights telemetry to my Azure web app?
Show me how to configure Application Insights in my ASP.NET Core application using the OpenTelemetry SDK.
What is the code to add Azure Monitor OpenTelemetry to my Node.js app and what environment variables do I need?
How do I enable auto-instrumentation for my app hosted in Azure App Service without code changes?
Bonnes pratiques
- 使用环境变量存储连接字符串,而不是将其硬编码在配置文件中
- 在应用启动时尽快调用监控设置
- 尽可能使用 OpenTelemetry Distro 包以简化配置
Éviter
- 不要修改 appsettings.json 来配置 App Insights(已弃用的方法)
- 不要在源代码中硬编码连接字符串
- 不要跳过为高流量应用设置采样
Foire aux questions
什么是 Application Insights?
我是否需要修改代码才能使用 App Insights?
我在哪里获取连接字符串?
支持哪些语言?
自动检测和手动检测有什么区别?
我可以使用此技能创建 App Insights 资源吗?
Détails du développeur
Structure de fichiers