appinsights-instrumentation

Guides instrumentation of web applications with Azure Application Insights telemetry.

Updated Jan 23, 2026
One-click install
npx skills add https://github.com/stephschofield/beth --skill appinsights-instrumentation-stephschofield
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: appinsights-instrumentation
Source: https://github.com/stephschofield/beth/tree/main/.github/skills/appinsights-instrumentation
Command: npx skills add https://github.com/stephschofield/beth --skill appinsights-instrumentation-stephschofield

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Adding observability to a web application requires knowing the right SDK, setup steps, and configuration for each language and hosting environment. This Skill provides structured guidance and reference material for instrumenting ASP.NET Core, Node.js, and Python apps with Azure Application Insights, removing guesswork from telemetry setup. ## Core Features & Use Cases - Language-Specific Instrumentation Guides: Step-by-step code modification instructions for ASP.NET Core, Node.js, and Python apps using Azure Monitor OpenTelemetry libraries. - Auto-Instrumentation Support: Directs users to Azure Portal auto-instrumentation for App Service hosted apps when no code changes are preferred. - Resource Provisioning References: Includes Azure CLI scripts and Bicep examples for creating the Application Insights resource and configuring connection strings. - Use Case: A developer asks how to add telemetry to their Node.js app hosted in Azure App Service. The Skill identifies the stack, provides the npm package and setup code, and explains how to configure the connection string environment variable. ## Quick Start Ask how to instrument your web application with Azure Application Insights and specify your app's language and hosting environment.

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 NuGet package, then add 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 Application Insights?▼

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 the 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. The recommended approach is setting the APPLICATIONINSIGHTS_CONNECTION_STRING environment variable, either through your IaC template or Azure CLI commands.

What Azure resources are needed for Application Insights?▼

You need a Log Analytics workspace and an Application Insights component, both creatable via Azure CLI or Bicep. Place them in the same resource group as your hosted app for easier management.