
Azure monitor opentelemetry py
Set up Application Insights telemetry in Python apps with one OpenTelemetry call
- Scripts
- None
- Platforms
- Claude Code, Codex, Cursor
- GitHub stars
- 3.2K
- Last commit
- 1 day ago
- License
- MIT
- Listing updated
- 1 day ago
Similar skills
About Azure monitor opentelemetry py
Azure monitor opentelemetry py is an open-source agent skill for cloud and infrastructure. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.
This skill guides an agent through adding Azure Monitor telemetry to a Python service using the Azure Monitor OpenTelemetry Distro. It covers installing the azure-monitor-opentelemetry package, configuring the connection string from environment variables, and calling a single configuration function early in startup so common libraries are instrumented automatically.
The guidance includes ready-made patterns for Flask, Django and FastAPI, plus manual code for custom spans, metrics and logs, sampling ratios, cloud role names, Live Metrics and selective instrumentation. It also sets rules for authentication: prefer Microsoft Entra credentials via DefaultAzureCredential, constrain the credential chain in production, and flush telemetry providers explicitly at process exit.
The skill expects a Python project and an Application Insights resource whose connection string is available to the app. It refers to additional reference files for secondary scenarios and production checklists.
When your agent uses it
Azure Monitor OpenTelemetry Distro for Python. Use for one-line Application Insights setup with auto-instrumentation. Triggers: "azure-monitor-opentelemetry", "configure_azure_monitor", "Application Insights", "OpenTelemetry distro", "auto-instrumentation".
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
From a static check of its 3 files (14 KB) on GitHub on 19 November 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
Copy the skill folder to ~/.claude/skills/azure-monitor-opentelemetry-py to use it in all your projects:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/microsoft/skills.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/azure-monitor-opentelemetry-py &&
cp -R "$tmp/.github/plugins/azure-sdk-python/skills/azure-monitor-opentelemetry-py" ~/.claude/skills/azure-monitor-opentelemetry-py &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/azure-monitor-opentelemetry-py inside it instead.
Copy the skill folder to ~/.agents/skills/azure-monitor-opentelemetry-py to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/microsoft/skills.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/azure-monitor-opentelemetry-py &&
cp -R "$tmp/.github/plugins/azure-sdk-python/skills/azure-monitor-opentelemetry-py" ~/.agents/skills/azure-monitor-opentelemetry-py &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/azure-monitor-opentelemetry-py inside it instead.
Copy the skill folder to ~/.cursor/skills/azure-monitor-opentelemetry-py to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/microsoft/skills.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/azure-monitor-opentelemetry-py &&
cp -R "$tmp/.github/plugins/azure-sdk-python/skills/azure-monitor-opentelemetry-py" ~/.cursor/skills/azure-monitor-opentelemetry-py &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/azure-monitor-opentelemetry-py inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/microsoft/skills.git --path .github/plugins/azure-sdk-python/skills/azure-monitor-opentelemetry-pyOr copy the folder to ~/.gemini/skills/azure-monitor-opentelemetry-py yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/azure-monitor-opentelemetry-py:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/microsoft/skills.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/azure-monitor-opentelemetry-py &&
cp -R "$tmp/.github/plugins/azure-sdk-python/skills/azure-monitor-opentelemetry-py" ~/.copilot/skills/azure-monitor-opentelemetry-py &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/azure-monitor-opentelemetry-py inside it instead.
Get the folder:
git clone --depth 1 https://github.com/microsoft/skills.gitThen copy skills/.github/plugins/azure-sdk-python/skills/azure-monitor-opentelemetry-py into your agent's skills folder as azure-monitor-opentelemetry-py. Agents that support SKILL.md read one folder per skill.
What it does
- One-line auto-instrumentation
- Configures Application Insights and automatically instruments supported web frameworks and client libraries with a single call.
- Entra ID authentication
- Shows how to authenticate ingestion with DefaultAzureCredential and constrain the credential chain for production.
- Custom traces, metrics and logs
- Provides examples for adding spans, counters and logging so custom telemetry reaches Application Insights.
- Framework integration patterns
- Includes setup examples for Flask, Django and FastAPI applications.
- Sampling and live metrics
- Covers sampling ratio configuration, cloud role names for Application Map, and enabling Live Metrics.
- Instrumentation selection
- Explains how to limit which libraries are instrumented and lists the supported ones with their telemetry types.
Good for
- Add Application Insights monitoring to a Flask or FastAPI service
- Instrument outgoing HTTP calls and database access in a Python app
- Create custom spans and metrics for a background operation
- Configure sampling to reduce telemetry volume in a high-traffic service
- Set up Entra ID authentication for Application Insights in production
Azure monitor opentelemetry py FAQ
What does the skill need to run?
It needs the azure-monitor-opentelemetry package installed and an APPLICATIONINSIGHTS_CONNECTION_STRING environment variable pointing to an Application Insights resource.
Which libraries are auto-instrumented?
Flask, Django, FastAPI, Requests, urllib3, httpx, aiohttp, psycopg2, pymysql, pymongo and redis are listed with trace collection.
How is authentication handled?
The skill recommends DefaultAzureCredential for Microsoft Entra authentication, with AZURE_TOKEN_CREDENTIALS=prod set in production to restrict the credential chain.
Which languages does it cover?
It covers Python code only, using the Azure Monitor OpenTelemetry Distro for Python.
How do I install Azure monitor opentelemetry py in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/azure-monitor-opentelemetry-py to use it in all your projects, or to .claude/skills/azure-monitor-opentelemetry-py in one project.
Does Azure monitor opentelemetry py run scripts?
No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use Azure monitor opentelemetry py?
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.
What are the best alternatives to Azure monitor opentelemetry py?
The closest alternatives to Azure monitor opentelemetry py are Azure monitor opentelemetry exporter py, Azure monitor opentelemetry ts, Connect observability, Azure monitor ingestion py and Azure mgmt applicationinsights dotnet.
Where this comes from
- Description: from the skill's own SKILL.md.
More from microsoft/skills

Finds AKS scheduling, bin-packing, node scaling and storage cost inefficiencies
- Open source
- 3.2K GitHub stars
- Cloud and infrastructure

Diagnoses AKS GPU and KAITO incidents using read-only cluster evidence
- Open source
- 3.2K GitHub stars
- Cloud and infrastructure

Matches exact AKS error signatures to documented fixes, with citations and read-only
- Open source
- 3.2K GitHub stars
- Cloud and infrastructure

Guides bounded packet captures on AKS nodes and Azure network evidence collection
- Open source
- 3.2K GitHub stars
- Cloud and infrastructure

Investigates live AKS incidents read-only, tracing pod, node, network and quota failures
- Open source
- 3.2K GitHub stars
- Cloud and infrastructure

Builds Azure portal deep links to the blade that performs a given operation
- Open source
- 3.2K GitHub stars
- Cloud and infrastructure



