appinsights-instrumentation

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

Updated Jul 20, 2026
One-click install
npx skills add https://github.com/merceralex397-collab/alex-stack --skill appinsights-instrumentation-merceralex397-collab
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: appinsights-instrumentation
Source: https://github.com/merceralex397-collab/alex-stack/tree/main/dev/azure-profile/azure-skills-main/azure-skills-main/.github/plugins/azure-skills/skills/appinsights-instrumentation
Command: npx skills add https://github.com/merceralex397-collab/alex-stack --skill appinsights-instrumentation-merceralex397-collab

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Developers often struggle to figure out how to add telemetry to their Azure-hosted web apps, including which SDK to install, how to configure the connection string, and whether auto-instrumentation is possible. This Skill provides structured guidance, SDK setup patterns, and configuration references for instrumenting apps with Azure Application Insights. ## Core Features & Use Cases - Instrumentation Guidance: Step-by-step patterns for ASP.NET Core, Node.js, and Python apps, including auto-instrumentation via the Azure Portal for App Service apps. - Resource Provisioning: Azure CLI commands and Bicep examples for creating Application Insights resources and configuring connection strings as environment variables. - SDK Quick References: Condensed references for Azure Monitor OpenTelemetry distros and exporters in Python, TypeScript, and Java, plus a Container Apps observability guide with KQL queries. - Use Case: A developer asks how to add telemetry to their Node.js app hosted in Azure App Service. The Skill identifies the hosting model, recommends auto-instrumentation or manual SDK setup with @azure/monitor-opentelemetry, and shows how to set the APPLICATIONINSIGHTS_CONNECTION_STRING environment variable. ## Quick Start Ask how to instrument your ASP.NET Core or Node.js app hosted in Azure with 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 on the running app to complete configuration.

How to instrument a Node.js app with Azure Application Insights?▼

Install @azure/monitor-opentelemetry via npm, then call useAzureMonitor() in your app's entry file as early as possible, after environment variables are loaded. The connection string is read from the APPLICATIONINSIGHTS_CONNECTION_STRING environment variable.

Can I enable Application Insights without changing my code?▼

Yes, auto-instrumentation is available for ASP.NET Core and Node.js apps hosted in Azure App Service through the Azure Portal's Application Insights blade. This requires no code changes, but other hosting models like Container Apps require manual SDK setup.

Should I configure Application Insights in appsettings.json?▼

No, configuring via appsettings.json is deprecated. The recommended approach is setting the APPLICATIONINSIGHTS_CONNECTION_STRING environment variable, either through your IaC template (Bicep/Terraform) or Azure CLI commands.

How do I monitor apps running in Azure Container Apps?▼

Container Apps provide built-in metrics and Log Analytics integration for console and system logs. For request-level tracing and dependency tracking, add the Application Insights SDK for your language and set the connection string as a container app secret.

When should I use azure-prepare instead of this guidance?▼

Use azure-prepare when you want to actually add App Insights to your project and modify code. This Skill provides reference material and guidance for understanding instrumentation patterns, while azure-prepare orchestrates the actual changes.