Application Insights Instrumentation

SKILL开发
开发 未标注权限 许可证不明确

Automates the integration of Azure Application Insights telemetry into web applications for monitoring, diagnostics, and performance tracking

一句话选型结论

按资料字段整理

Application Insights Instrumentation是开发类的 Agent Skill,安装方式:GitHub 仓库,权限级别未标注,许可证不明确,没有现成安装命令,需按说明手动放置 SKILL.md。技能本质是给模型读的说明书,效果取决于模型与客户端;装完先用一个小任务验证,再放进正式流程。

分类开发 安装方式GitHub 仓库 权限级别未标注权限 许可证许可证不明确
累计安装 未标注 本周 未标注
GitHub 星标 8 仓库 vibe-vscode
下载量 未标注 技能市场下载数
权限级别 未标注权限 安装前请确认风险范围
许可证 许可证不明确 未说明

安装

GitHub 仓库
在支持 Skills 的客户端里执行,装完问一句「你有哪些技能」验证
  1. 1
    确认客户端支持

    确认你的客户端支持 Skills(Claude、Codex、Cursor 等),并升级到较新的版本。

  2. 2
    拿到技能文件

    按安装说明或仓库 README,把 SKILL.md 放到客户端的 skills 目录(一般一个技能一个文件夹)。

  3. 3
    刷新技能列表

    重新打开客户端,或刷新技能列表,让新放进来的技能被加载。

  4. 4
    验证是否生效

    问一句「你有哪些技能」,确认列表里出现它,再拿一个小任务试跑。

技能档案

开发
字段来自技能仓库与公开索引,中文说明由本站标注
作者 / 维护方yldgio仓库 vibe-vscode · 版本 未标注
宿主客户端未标注技能可被这些客户端加载
安装方式GitHub 仓库安装包 yldgio/vibe-vscode
权限级别未标注权限安装前请确认风险范围
许可证未说明许可证不明确,商用前请自行确认条款
仓库可用性available技能仓库当前是否可访问
最近核验未标注上游最后核验时间 · 数据更新 未标注
正文体量9.5 KBSKILL.md 原文大小,越大说明说明书写得越细

典型使用场景

3 类
按分类整理的常见用法,具体以 SKILL.md 为准
写代码与改 bug

按需求补代码、定位并修掉报错。

读仓库与生成改动

让模型读懂项目结构,再给出可落地的改动。

跑测试与排查故障

按现象排查问题,补测试用例并复跑。

选择建议

装之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 基础信息齐全,可以先按说明装一个试试。

先想清楚的地方

  • 没有标注权限级别,实际能做什么要装好后确认。
  • 许可证不明确,商用或二次分发前先到仓库确认条款。
  • 没有现成安装命令,要按安装说明或仓库 README 手动放置。
  • 没有做站内核验,内容以作者仓库为准。
  • 技能只是说明书,实际效果取决于模型与客户端,装完先用小任务试一遍。

更适合

  • 需要在开发场景里给模型补一套做法的人。
  • 愿意先读一遍 SKILL.md、确认它会让模型做什么的人。

不太适合

  • 对许可证要求很严、必须明确可商用的人。
  • 只想装完就自动变强、不打算看说明书的人。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
技能权限级别安装方式累计安装宿主客户端安装命令
Application Insights Instrumentation当前 未标注权限 GitHub 仓库 未标注 未标注 无
技能审查员 浏览器控制 ClawHub 市场 877.9 万 OpenClaw 有
Vercel React 最佳实践 浏览器控制 GitHub 仓库 849.1 万 Codex、Claude、Cursor 有
GitHub 代码协作 联网访问 ClawHub 市场 763.3 万 OpenClaw 有
网页设计指南 联网访问 GitHub 仓库 668.6 万 Codex、Claude、Cursor 有
本体论 只读 ClawHub 市场 663.7 万 OpenClaw 有

SKILL.md 全文

9.5 KB
模型实际读到的说明书原文,来自技能仓库

Application Insights Instrumentation

This skill helps you integrate Azure Application Insights into your applications for comprehensive monitoring and telemetry.

When to Use This Skill

Use this skill when you need to:
- Add monitoring and telemetry to ASP.NET Core applications
- Instrument Node.js applications with Application Insights
- Configure custom metrics and logging
- Set up performance tracking and dependency monitoring
- Implement application health monitoring

Capabilities

  • Instrument ASP.NET Core applications with Application Insights SDK
  • Configure telemetry for Node.js applications
  • Set up custom metrics and logging
  • Configure connection strings and instrumentation keys
  • Enable dependency tracking and request monitoring
  • Implement custom telemetry tracking

Prerequisites

  • Azure subscription with Application Insights resource
  • Target application (ASP.NET Core or Node.js)
  • Application hosted in Azure (App Service, Container Apps, etc.) or on-premises
  • Understanding of your application's monitoring requirements

Implementation Guide

For ASP.NET Core Applications

Step 1: Add the NuGet Package

dotnet add package Microsoft.ApplicationInsights.AspNetCore

Step 2: Configure in Program.cs

// In Program.cs (ASP.NET Core 6+)
var builder = WebApplication.CreateBuilder(args);

// Add Application Insights telemetry
builder.Services.AddApplicationInsightsTelemetry(options =>
{
    options.ConnectionString = builder.Configuration["ApplicationInsights:ConnectionString"];
});

var app = builder.Build();

Step 3: Add Configuration

Add to appsettings.json:

{
  "ApplicationInsights": {
    "ConnectionString": "InstrumentationKey=your-key;IngestionEndpoint=https://your-region.in.applicationinsights.azure.com/"
  },
  "Logging": {
    "ApplicationInsights": {
      "LogLevel": {
        "Default": "Information",
        "Microsoft": "Warning"
      }
    }
  }
}

Step 4: Use Custom Telemetry

public class MyService
{
    private readonly TelemetryClient _telemetryClient;

    public MyService(TelemetryClient telemetryClient)
    {
        _telemetryClient = telemetryClient;
    }

    public async Task ProcessOrderAsync(Order order)
    {
        using var operation = _telemetryClient.StartOperation<RequestTelemetry>("ProcessOrder");

        try
        {
            // Track custom event
            _telemetryClient.TrackEvent("OrderProcessing", new Dictionary<string, string>
            {
                { "OrderId", order.Id },
                { "CustomerId", order.CustomerId }
            });

            // Your business logic here
            await ProcessOrder(order);

            // Track custom metric
            _telemetryClient.TrackMetric("OrderValue", order.TotalAmount);

            operation.Telemetry.Success = true;
        }
        catch (Exception ex)
        {
            _telemetryClient.TrackException(ex);
            operation.Telemetry.Success = false;
            throw;
        }
    }
}

For Node.js Applications

Step 1: Install Package

npm install applicationinsights

Step 2: Initialize at Startup

// At the very beginning of your app (before other requires)
const appInsights = require('applicationinsights');

appInsights.setup(process.env.APPLICATIONINSIGHTS_CONNECTION_STRING)
    .setAutoDependencyCorrelation(true)
    .setAutoCollectRequests(true)
    .setAutoCollectPerformance(true, true)
    .setAutoCollectExceptions(true)
    .setAutoCollectDependencies(true)
    .setAutoCollectConsole(true)
    .setUseDiskRetryCaching(true)
    .setSendLiveMetrics(true)
    .start();

const client = appInsights.defaultClient;

module.exports = client;

Step 3: Track Custom Telemetry

const appInsights = require('./appInsights');

async function processOrder(order) {
    const startTime = Date.now();

    try {
        // Track custom event
        appInsights.trackEvent({
            name: 'OrderProcessing',
            properties: {
                orderId: order.id,
                customerId: order.customerId
            }
        });

        // Your business logic
        await handleOrder(order);

        // Track metric
        const duration = Date.now() - startTime;
        appInsights.trackMetric({ name: 'OrderProcessingTime', value: duration });

        // Track custom metric
        appInsights.trackMetric({ name: 'OrderValue', value: order.totalAmount });

    } catch (error) {
        // Track exception
        appInsights.trackException({ exception: error });
        throw error;
    }
}

Best Practices

Security

  • Never hardcode connection strings - Use environment variables or Azure Key Vault
  • Use Managed Identity when running in Azure for authentication
  • Rotate instrumentation keys regularly if not using connection strings
  • Filter sensitive data before sending telemetry
  • Implement least-privilege access to Application Insights resources

Performance

  • Enable sampling in high-volume applications to control costs:
    csharp builder.Services.AddApplicationInsightsTelemetry(options => { options.EnableAdaptiveSampling = true; });
  • Use async methods for telemetry operations
  • Batch telemetry when tracking multiple events
  • Configure appropriate flush intervals

Monitoring

  • Set up custom properties for better filtering:
    csharp var telemetryInitializer = new CustomTelemetryInitializer(); builder.Services.AddSingleton<ITelemetryInitializer>(telemetryInitializer);
  • Create custom metrics for business KPIs
  • Configure alerts in Azure Portal for critical patterns
  • Use dependency tracking to identify bottlenecks
  • Enable live metrics for real-time monitoring

Cost Management

  • Use sampling to reduce ingestion volume (90-95% reduction typical)
  • Filter noisy telemetry at source
  • Set retention policies appropriate to your needs
  • Monitor ingestion rates and costs in Azure Portal

Common Patterns

Pattern 1: Track Business Metrics

public class OrderMetricsTracker
{
    private readonly TelemetryClient _telemetry;

    public void TrackOrderCompleted(Order order)
    {
        _telemetry.TrackEvent("OrderCompleted", new Dictionary<string, string>
        {
            { "OrderId", order.Id },
            { "PaymentMethod", order.PaymentMethod },
            { "ShippingCountry", order.ShippingAddress.Country }
        });

        _telemetry.TrackMetric("OrderRevenue", order.TotalAmount);
        _telemetry.TrackMetric("OrderItems", order.Items.Count);
    }
}

Pattern 2: Track User Actions

function trackUserAction(action, details) {
    appInsights.trackEvent({
        name: `User_${action}`,
        properties: {
            userId: details.userId,
            action: action,
            page: details.page,
            timestamp: new Date().toISOString()
        }
    });
}

Pattern 3: Performance Monitoring

public async Task<Result> PerformOperationAsync()
{
    using var operation = _telemetryClient.StartOperation<DependencyTelemetry>("DatabaseQuery");
    operation.Telemetry.Type = "SQL";
    operation.Telemetry.Target = "ProductionDB";

    try
    {
        var result = await _database.QueryAsync();
        operation.Telemetry.Success = true;
        return result;
    }
    catch (Exception ex)
    {
        operation.Telemetry.Success = false;
        _telemetryClient.TrackException(ex);
        throw;
    }
}

Troubleshooting

Telemetry Not Appearing

  1. Verify connection string is correct and accessible
  2. Check network connectivity to Azure ingestion endpoint
  3. Ensure TelemetryClient.Flush() is called before app shutdown
  4. Check sampling configuration - you might be filtering too aggressively
  5. Verify no firewall blocking outbound connections to Azure
  6. Wait 2-3 minutes for telemetry to appear in portal

High Costs

  1. Enable adaptive sampling to reduce volume
  2. Filter unnecessary telemetry at the source
  3. Review and adjust data retention policies
  4. Use summary metrics instead of detailed events where possible

Missing Dependencies

  1. Verify dependency tracking is enabled in configuration
  2. Check that packages support automatic instrumentation
  3. Manually track dependencies if auto-collection doesn't work

Environment Configuration

Development

{
  "ApplicationInsights": {
    "ConnectionString": "InstrumentationKey=dev-key",
    "EnableAdaptiveSampling": false,
    "EnableDebugLogger": true
  }
}

Production

{
  "ApplicationInsights": {
    "ConnectionString": "InstrumentationKey=prod-key",
    "EnableAdaptiveSampling": true,
    "SamplingPercentage": 5.0
  }
}

References

  • Application Insights Overview
  • ASP.NET Core Integration
  • Node.js Integration
  • Sampling in Application Insights
  • Custom Events and Metrics

常见问题

5 问
答案由本站依据条目字段整理
Application Insights Instrumentation怎么安装?

没有现成安装命令:按安装说明或仓库 README,把 SKILL.md 放进客户端的 skills 目录(一般一个技能一个文件夹)。

Application Insights Instrumentation支持哪些客户端?

资料没有标注宿主客户端,但只要客户端支持 Skills(Claude、Codex、Cursor 等),一般都能加载。

Application Insights Instrumentation权限高吗,安全吗?

权限级别为未标注权限。安装前先看它会读取或写入哪些内容。

Application Insights Instrumentation收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于技能本身和所用的模型或客户端,正式使用前按作者说明确认。

Application Insights Instrumentation用什么许可证?

许可证标注为 未说明(许可证不明确)。商用或二次分发前请到仓库确认条款原文。

热门专题

按场景挑技能
全部专题 →

技能内容以作者仓库为准;分类、权限级别与许可证状态的中文说明为中文整理,最近核验 未标注。