appinsights-instrumentation

Provides guidance and references for instrumenting web applications with Azure Application Insights telemetry.

1|Updated Apr 1, 2026
One-click install
npx skills add https://github.com/AlahmadiQ8/sre-agent-demo --skill appinsights-instrumentation-alahmadiq8
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: appinsights-instrumentation
Source: https://github.com/AlahmadiQ8/sre-agent-demo/tree/main/.claude/skills/appinsights-instrumentation
Command: npx skills add https://github.com/AlahmadiQ8/sre-agent-demo --skill appinsights-instrumentation-alahmadiq8

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Developers often struggle to determine the correct way to add Azure Application Insights telemetry to their web applications, since the setup differs by language, framework, and hosting environment. This Skill supplies the guidance, SDK setup patterns, and configuration references needed to instrument apps correctly. ## Core Features & Use Cases - Language-Specific Instrumentation Guides: Step-by-step code modification instructions for ASP.NET Core, Node.js, and Python applications using Azure Monitor OpenTelemetry libraries. - Auto-Instrumentation Support: Guidance for enabling App Insights on Azure App Service without code changes via the Azure Portal. - Resource Provisioning References: Bicep examples and Azure CLI scripts for creating App Insights resources and configuring connection strings as environment variables. - Use Case: A developer asks how to add telemetry to an ASP.NET Core app hosted in Azure Container Apps. The Skill directs them to install Azure.Monitor.OpenTelemetry.AspNetCore, call UseAzureMonitor() in Program.cs, and set the APPLICATIONINSIGHTS_CONNECTION_STRING environment variable. ## Quick Start Ask how to instrument your ASP.NET Core or Node.js application with Azure Application Insights telemetry.

Frequently Asked Questions about appinsights-instrumentation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add Application Insights to an ASP.NET Core app?

Install the Azure.Monitor.OpenTelemetry.AspNetCore package, then add builder.Services.AddOpenTelemetry().UseAzureMonitor() in Program.cs before builder.Build(). Set the APPLICATIONINSIGHTS_CONNECTION_STRING environment variable with your App Insights connection string.

How to instrument a Node.js app with Azure Monitor OpenTelemetry?

Install @azure/monitor-opentelemetry via npm, then call useAzureMonitor() in your app's entry file. The setup call must run after environment variables are loaded but before other modules, since it reads the connection string from the environment.

Can I enable Application Insights without changing my code?

Yes, auto-instrumentation is supported for ASP.NET Core and Node.js apps hosted in Azure App Service. Enable it through the Application Insights blade in the Azure Portal for your App Service, with no code modifications required.

Should I configure App Insights in appsettings.json or environment variables?

Use the APPLICATIONINSIGHTS_CONNECTION_STRING environment variable, which is the current recommended approach. Configuring via appsettings.json is deprecated and should be avoided.

When should I use the OpenTelemetry distro instead of the exporter?

Use the azure-monitor-opentelemetry distro for standard instrumentation, as it handles configuration automatically. Choose the azure-monitor-opentelemetry-exporter only when you need custom pipelines or manual exporter control.