Skip to content
Skillpedia
APIs & servers (backend)48k Β· #3953

azure-mgmt-applicationinsights-dotnet

What it does

This tool helps manage Azure Application Insights, a service for monitoring your applications' performance and availability. You can use it to create and configure these resources.

When to use it

  • βœ“When you need to set up monitoring for a new application.
  • βœ“To get connection details for an existing application.
  • βœ“To create automatic tests that check if your application is working.

Skill link

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/azure-mgmt-applicationinsights-dotnet/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/azure-mgmt-applicationinsights-dotnet/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute β†’

Example of what to ask your AI

β€œCreate a new Application Insights for my web application named 'my-site' in the resource group 'my-group'.”

5 new skills a week. 1 minute to read.

How it works

It connects to Azure and uses specific commands to create or retrieve Application Insights resources. You need to provide details like the application name and its location.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Azure.ResourceManager.ApplicationInsights (.NET)

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

Installation

dotnet add package Azure.ResourceManager.ApplicationInsights
dotnet add package Azure.Identity

Current Version: v1.0.0 (GA)
API Version: 2022-06-15

Environment Variables

AZURE_SUBSCRIPTION_ID=<your-subscription-id>
AZURE_RESOURCE_GROUP=<your-resource-group>
AZURE_APPINSIGHTS_NAME=<your-appinsights-component>

Authentication

using Azure.Identity;
using Azure.ResourceManager;
using Azure.ResourceManager.ApplicationInsights;

ArmClient client = new ArmClient(new DefaultAzureCredential());

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

Core Workflows

1. Create Application Insights Component (Workspace-based)

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}");

2. Get Connection String and Keys

ApplicationInsightsComponentResource component = await resourceGroup
    .GetApplicationInsightsComponentAsync("my-appinsights");

// Get connection string for SDK configuration
string connectionString = component.Data.ConnectionString;
string instrumentationKey = component.Data.InstrumentationKey;
string appId = component.Data.AppId;

Console.WriteLine($"Connection String: {connectionString}");
Console.WriteLine($"Instrumentation Key: {instrumentationKey}");
Console.WriteLine($"App ID: {appId}");

3. Create API Key

ApplicationInsightsComponentResource component = await resourceGroup
    .GetApplicationInsightsComponentAsync("my-appinsights");

ApplicationInsightsComponentApiKeyCollection apiKeys = component.GetApplicationInsightsComponentApiKeys();

// API key for reading telemetry
ApplicationInsightsApiKeyContent keyContent = new ApplicationInsightsApiKeyContent
{
    Name = "ReadTelemetryKey",
    LinkedReadProperties =
    {
        $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{component.Data.Name}/api",
        $"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.insights/components/{component.Data.Name}/agentconfig"
    }
};

ApplicationInsightsComponentApiKeyResource apiKey = await apiKeys
    .CreateOrUpdateAsync(WaitUntil.Completed, keyContent);


…
FAQ

What is Application Insights?

It's an Azure service that helps you understand how your applications are performing by monitoring performance, errors, and usage.

What are Application Insights 'resources'?

These are the components Azure creates to collect and analyze your application's data, such as the Application Insights instance itself, access keys, and availability tests.

Do I need to know how to code to use this?

No, this tool is designed to simplify the process. You just need to state what you want in plain language.

Details

Original description by the author

Azure Application Insights SDK for .NET. Application performance monitoring and observability resource management.

repo: sickn33/agentic-awesome-skills

Popularity

GitHub stars
48k
Ranking position
#3953
License
MIT
Updated
10/15/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills