appinsights-instrumentation

Provides guidance and SDK references for instrumenting webapps with Azure Application Insights telemetry.

Updated May 12, 2026
One-click install
npx skills add https://github.com/sohamda/apex-try-out-demo-repo --skill appinsights-instrumentation-sohamda
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: appinsights-instrumentation
Source: https://github.com/sohamda/apex-try-out-demo-repo/tree/main/.archive/_archived_skills/appinsights-instrumentation
Command: npx skills add https://github.com/sohamda/apex-try-out-demo-repo --skill appinsights-instrumentation-sohamda

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 telemetry to their Azure-hosted webapps, since the instrumentation approach varies by language, framework, and hosting model. This Skill provides structured guidance, SDK setup patterns, and configuration references for instrumenting applications with Azure Application Insights. ## Core Features & Use Cases - Instrumentation Guidance: Step-by-step patterns for ASP.NET Core, Node.js, and Python apps, covering both auto-instrumentation via Azure Portal and manual code-based setup. - Resource Provisioning: A PowerShell script that creates a Log Analytics workspace and Application Insights resource, then configures the connection string on Web Apps, Container Apps, or Function Apps. - SDK Quick References: Condensed references for Azure Monitor OpenTelemetry distros and exporters in Python, TypeScript, and Java. - Use Case: You have an ASP.NET Core app hosted in Azure App Service and want to understand how to add telemetry. This Skill walks you through auto-instrumentation or manual setup with the Azure Monitor OpenTelemetry SDK and connection string configuration. ## 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 call builder.Services.AddOpenTelemetry().UseAzureMonitor() in Program.cs before builder.Build(). Set the APPLICATIONINSIGHTS_CONNECTION_STRING environment variable with your resource connection string.

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

Install @azure/monitor-opentelemetry via npm, then call useAzureMonitor() at the top of your app's entry file. It must run after environment variables load but before other imports, since it reads the connection string from the environment.

Can I enable Application Insights without changing my code?▼

Yes, auto-instrumentation works for ASP.NET Core and Node.js apps hosted in Azure App Service. Use the Application Insights blade in Azure Portal for your App Service to enable monitoring without code modifications.

Should I configure Application Insights in appsettings.json?▼

No, appsettings.json configuration is deprecated for Application Insights. The recommended approach is setting the APPLICATIONINSIGHTS_CONNECTION_STRING environment variable, either in your IaC template or via Azure CLI.

What Azure resources are needed for Application Insights?▼

You need a Log Analytics workspace and an Application Insights component, which can be created with Azure CLI commands or added to an existing Bicep template. Place them in the same resource group as your hosted app for easier management.

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

Use the azure-monitor-opentelemetry distro for standard setups, and the exporter only when you need custom pipelines. Note the Java exporter is deprecated in favor of azure-monitor-opentelemetry-autoconfigure.