agentleFS
Mingz6Mingz6/copilot-dev-os/skills/appinsights-instrumentation/SKILL.md

appinsights-instrumentation

Skill1 starsChanged 37 days agoMITView on GitHub

Wire Azure Application Insights into a webapp for telemetry — requests, dependencies, exceptions, custom events. Use when: 'add app insights', 'instrument telemetry', 'track exceptions in Azure', 'wire up Application Insights', 'add observability to this app', 'send telemetry to Azure'.

10 other projects use a version of this, 9 of them edited.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

8 rules. 2 are common, 3 are distinctive, and 3 are very specific to this project.

  • 2

    Common

    Most of the 9 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when the user wants to enable telemetry for their webapp.

    line 12
  2. Distinctive:

    If the app is a C# ASP.NET Core app hosted in Azure App Service, use auto-instrumentation via Azure Portal (Application Insights > Enable) …

    line 29
  3. Common:

    Use one of the following options that fits the environment.

    line 37
  4. Common:

    Add AppInsights to existing Bicep template.

    line 39
  5. Distinctive:

    Use Azure CLI to create the App Insights resource.

    line 40
  6. Very specific:

    ASP.NET Core: Add Microsoft.ApplicationInsights.AspNetCore NuGet package, call builder.Services.AddApplicationInsightsTelemetry(), …

    line 46
  7. Very specific:

    Node.js: Add applicationinsights npm package, call setup() and start() at app entry point, configure connection string.

    line 47
  8. Very specific:

    Python: Add azure-monitor-opentelemetry package, call configure_azure_monitor(connection_string=...) at app entry point.

    line 48

“Common” is measured: kept by at least 6 in 10 of the 9 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

AppInsights instrumentation

This skill enables sending telemetry data of a webapp to Azure App Insights for better observability of the app's health.

When to use this skill

Use this skill when the user wants to enable telemetry for their webapp.

Prerequisites

The app in the workspace must be one of these kinds

  • An ASP.NET Core app hosted in Azure
  • A Node.js app hosted in Azure

Guidelines

Collect context information

Find out the (programming language, application framework, hosting) tuple of the application the user is trying to add telemetry support in. This determines how the application can be instrumented. Read the source code to make an educated guess. Confirm with the user on anything you don't know. You must always ask the user where the application is hosted (e.g. on a personal computer, in an Azure App Service as code, in an Azure App Service as container, in an Azure Container App, etc.).

Prefer auto-instrument if possible

If the app is a C# ASP.NET Core app hosted in Azure App Service, use auto-instrumentation via Azure Portal (Application Insights > Enable) — no code changes needed.

Manually instrument

Manually instrument the app by creating the AppInsights resource and update the app's code.

Create AppInsights resource

Use one of the following options that fits the environment.

  • Add AppInsights to existing Bicep template. This is the best option if there are existing Bicep template files in the workspace.
  • Use Azure CLI to create the App Insights resource.

Recommend creating the App Insights resource in the same resource group as the hosted app.

Modify application code

  • ASP.NET Core: Add Microsoft.ApplicationInsights.AspNetCore NuGet package, call builder.Services.AddApplicationInsightsTelemetry(), configure connection string via APPLICATIONINSIGHTS_CONNECTION_STRING.
  • Node.js: Add applicationinsights npm package, call setup() and start() at app entry point, configure connection string.
  • Python: Add azure-monitor-opentelemetry package, call configure_azure_monitor(connection_string=...) at app entry point.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.