microsoft/skills

azure-mgmt-applicationinsights-dotnet

用 .NET ARM SDK 管理 Application Insights 与可用性测试

  • SKILL.md 已保存
  • 中文用法已整理
  • 安装与运行未实测
先判断是否解决你的问题

azure-mgmt-applicationinsights-dotnet 是什么?

这个 Skill 使用 Azure.ResourceManager.ApplicationInsights 管理 Application Insights ARM 资源,例如组件、web tests、workbooks 和 linked storage。它不同于应用内 telemetry SDK:此包配置资源,不会自动把应用事件埋点发到监控服务。

中文说明由本站依据来源整理;英文原文保留在页面下方。

按客户端选择安装入口

怎么接入你的 Agent?

  1. 定位完整 Skill 目录

    打开本项目来源,核对 SKILL.md 及其引用的脚本和资料。

  2. 交给你正在用的 Agent

    在下面选择客户端,展开并复制安装指令,让 Agent 读取来源后选择安装方式。

  3. 确认识别,再做具体任务

    让 Agent 回报安装目录和识别到的名称 azure-mgmt-applicationinsights-dotnet,然后按本页使用示例提供材料。

展开并复制给 Codex 的安装指令
发送给 Codex

安装并检查 azure-mgmt-applicationinsights-dotnet

请在 Codex 的当前工作环境中安装并检查 azure-mgmt-applicationinsights-dotnet 这个 Skill。

项目身份:microsoft/skills / azure-mgmt-applicationinsights-dotnet
来源:https://github.com/microsoft/skills/blob/f03ec5392f7a0f3aca12af47477e92f1edf7b44c/.github/plugins/azure-sdk-dotnet/skills/azure-mgmt-applicationinsights-dotnet/SKILL.md
已定位的源文件:.github/plugins/azure-sdk-dotnet/skills/azure-mgmt-applicationinsights-dotnet/SKILL.md

1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。
准备输入,再按步骤执行

装好以后,具体怎么用?

准备哪些材料

  • 安装 Azure.ResourceManager.ApplicationInsights、Azure.Identity,准备订阅、resource group 和有权管理的身份。
  • 需要创建 workspace-based component 时先准备 Log Analytics workspace ID、区域、保留天数与采样预算。
  • 用真实监控 URL/测试账户制定 availability test,不要把登录密码或测试密钥硬编码进测试定义。

实际使用顺序

  1. 先只读检查已有 Application Insights component 和关联 workspace,避免重复建资源。
  2. 新建或调整 component 时确认 ingestion/query 公网访问、retention、sampling 与 privacy settings。
  3. 创建 web test 前检查监测URL、运行地点、频率、超时和真实访问行为;创建 workbook 时验证 KQL 查询与数据源。
  4. 将 ConnectionString 安全交给应用侧 OpenTelemetry/Application Insights exporter;API key 只在读取接口且确有需要时创建并安全保存。
使用示例

从一个具体任务开始

本站根据源文件编写的使用示例,未在本站实际运行。示例中的文件由你提供。

安装并识别 Skill 后发送

复制一个具体任务

请基于 azure-mgmt-applicationinsights-dotnet 给我写一份只读检查方案:列出 component 的 workspace、retention、sampling 与已有 web tests,不获取 API keys、不创建资源。
预期结果

得到只读盘点字段与 C# 草案;未访问订阅或导出连接信息。

使用前先看这些限制

使用条件与边界

  • 组件连接字符串和 instrumentation key 不应打印到控制台;源文示例直接输出,生产代码需删去。
  • Application Insights ARM SDK 的管理操作不等于安装 telemetry SDK;应用仍需单独配置导出器与埋点。
  • Web test 会对真实目标按设定频率发出请求,含写请求/登录步骤时应做严格隔离。
针对这个 Skill 的疑问

常见问题

装了管理SDK为什么没有监控数据?

管理SDK只创建或查询 Azure 监控资源;应用程序还需集成 telemetry SDK/Exporter 并将数据发送到对应 connection string。

SamplingPercentage 能提高数据精度吗?

它决定采集比例以控制数据量和成本;降低比例可能丢弃更多事件,不能等同于提高精度。

需要核对时再展开原文

来源原文与资料状态

源文件
已保存 SKILL.md,抓取于 2026-11-16T12:36:35.145Z
中文使用说明
已针对下方源文件版本整理用途、用法和常见问题
安装与任务测试
本站未执行安装或任务测试
来源复核
本页中文用法已对照保存版本的完整 SKILL.md 阅读整理
展开 SKILL.md 原文、章节与历史收录资料

.github/plugins/azure-sdk-dotnet/skills/azure-mgmt-applicationinsights-dotnet/SKILL.md · 抓取时间 2026-11-16T12:36:35.145Z

以下保留源文件的 description、章节及摘录,供核对中文说明;完整文件通过上方链接打开。

抓取成功不代表已完成安装或任务测试。

来源 description(原文)

Azure Application Insights SDK for .NET. Application performance monitoring and observability resource management. Use for creating Application Insights components, web tests, workbooks, analytics items, and API keys. Triggers: "Application Insights", "ApplicationInsights", "App Insights", "APM", "application monitoring", "web tests", "availability tests", "workbooks".

查看源文件章节 / Source sections
  • 原文:Azure.ResourceManager.ApplicationInsights (.NET)
  • 安装 / Installation
  • 原文:Environment Variables
  • 原文:Authentication
  • 原文:Resource Hierarchy
  • 原文:Core Workflows
  • 原文:1. Create Application Insights Component (Workspace-based)
  • 原文:2. Get Connection String and Keys
  • 原文:3. Create API Key
  • 原文:4. Create Web Test (Availability Test)
  • 原文:5. Create Multi-Step Web Test
  • 原文:6. Create Workbook
  • 原文:7. Link Storage Account
  • 原文:8. List and Manage Components
  • 原文:9. Update Component
  • 原文:10. Delete Resources
  • 原文:Key Types Reference
  • 原文:Application Types
  • 原文:Web Test Locations
  • 原文:Best Practices
  • 原文:Error Handling
  • 原文:SDK Integration
  • 原文:Related SDKs
  • 原文:Reference Links
原文:Azure.ResourceManager.ApplicationInsights (.NET)

Azure Resource Manager SDK for managing Application Insights resources for application performance monitoring.

安装 / Installation

```bash dotnet add package Azure.ResourceManager.ApplicationInsights dotnet add package Azure.Identity ``` **Current Version**: v1.0.0 (GA) **API Version**: 2022-06-15

原文:Environment Variables

```bash AZURE_SUBSCRIPTION_ID=<your-subscription-id> # Required: Azure subscription ID AZURE_RESOURCE_GROUP=<your-resource-group> # Required: Azure resource group name AZURE_APPINSIGHTS_NAME=<your-appinsights-component> # Required: Application Insights component name AZURE_TOKEN_CREDENTIALS=prod # Required only if DefaultAzureCredential is used in production ```

原文:Authentication

```csharp using Azure.Identity; using Azure.ResourceManager; using Azure.ResourceManager.ApplicationInsights; // Local dev: DefaultAzureCredential. Production: set AZURE_TOKEN_CREDENTIALS=prod or AZURE_TOKEN_CREDENTIALS=<specific_credential> var credential = new DefaultAzureCredential( DefaultAzureCredential.DefaultEnvironmentVariableName ); // Or use a specific credential directly in production: // See https://learn.microsoft.com/dotnet/api/overview/azure/identity-readme?view=azure-dotnet#credential-classes // var credential = new ManagedIdentityCredential(); ArmClient client = new ArmClient(credential); ```

原文:Resource Hierarchy

``` Subscription └── ResourceGroup └── ApplicationInsightsComponent # App Insights resource ├── ApplicationInsightsComponentApiKey # API keys for programmatic access ├── ComponentLinkedStorageAccount # Linked storage for data export └── (via component ID) ├── WebTest # Availability tests ├── Workbook # Workbooks for analysis ├── WorkbookTemplate # Workbook templates └── MyWorkbook # Private workbooks ```

原文:1. Create Application Insights Component (Workspace-based)

```csharp using Azure.ResourceManager.ApplicationInsights; using Azure.ResourceManager.ApplicationInsights.Models; ResourceGroupResource resourceGroup = await client .GetDefaultSubscriptionAsync() .Result .GetResourceGroupAsync("my-resource-group"); ApplicationInsightsComponentCollection components = resourceGroup.GetApplicationInsightsComponents(); // Workspace-based Application Insights (recommended) ApplicationInsightsComponentData data = new ApplicationInsightsComponentData( AzureLocation.EastUS, ApplicationInsightsApplicationType.Web) { Kind = "web", WorkspaceResourceId = new ResourceIdentifier( "/subscriptions/<sub-id>/resourceGroups/<rg>/providers/Microsoft.OperationalInsights/workspaces/<workspace-name>"), IngestionMode = IngestionMode.LogAnalytics, PublicNetworkAccessForIngestion = PublicNetworkAccessType.Enabled, PublicNetworkAccessForQuery = PublicNetworkAccessType.Enabled, RetentionInDays = 90, SamplingPercentage = 100, DisableIPMasking = false, ImmediatePurgeDataOn30Days = false, Tags = { { "environment", "production" }, { "application", "mywebapp" } } }; ArmOperation<ApplicationInsightsComponentResource> operation = await components .CreateOrUpdateAsync(WaitUntil.Completed, "my-appinsights", data); ApplicationInsightsComponentResource component = operation.Value; Console.WriteLine($"Component created: {component.Data.Name}"); Console.WriteLine($"Instrumentation Key: {component.Data.InstrumentationKey}"); Console.WriteLine($"Connection String: {component.Data.ConnectionString}"); ```

文件 SHA256:ef6c083b7ddabc0c89856e6755914b2619f93efb8948e70f1bcc458c1126ecca

仓库许可证记录:MIT;skill-declaration-captured-not-interpreted,查看来源。

SKILL.md原文description · 2026-11-16T12:36:35.145Z

Azure Application Insights SDK for .NET. Application performance monitoring and observability resource management. Use for creating Application Insights components, web tests, workbooks, analytics items, and API keys. Triggers: "Application Insights", "ApplicationInsights", "App Insights", "APM", "application monitoring", "web tests", "availability tests", "workbooks".

查看历史简介来源

历史收录数据

来源仓库microsoft/skills
Skill源路径.github/plugins/azure-sdk-dotnet/skills/azure-mgmt-applicationinsights-dotnet/SKILL.md

安装前请让使用的Agent先读取这个SKILL.md及其所在目录,确认依赖和所需权限。此页不生成未经来源验证的安装命令。

返回 Skills 目录,按任务继续筛选 · MCP与Skills教程与资源