Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

azure-monitor-opentelemetry-py

Skill by sickn33

Sets up Azure Application Insights for Python apps with one call to configure_azure_monitor(). It adds OpenTelemetry auto-instrumentation for common web frameworks and libraries. It is for Python developers who want Azure Monitor telemetry with little setup.

  • Score 89
  • 51k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install azure-monitor-opentelemetry-py

Built from the published package, never by AI.

git clone --depth 1 https://github.com/sickn33/agentic-awesome-skills /tmp/agentic-awesome-skills && mkdir -p ~/.claude/skills && cp -r /tmp/agentic-awesome-skills/skills/azure-monitor-opentelemetry-py ~/.claude/skills/azure-monitor-opentelemetry-py

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install azure-monitor-opentelemetry-py in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This skill shows how to use the Azure Monitor OpenTelemetry Distro for Python. The main step is calling configure_azure_monitor() once, early in the application. It reads the Application Insights connection string from the APPLICATIONINSIGHTS_CONNECTION_STRING environment variable, or accepts it as a parameter. The source includes examples for Flask, Django and FastAPI, plus custom traces, metrics and logs.

The skill also covers sampling, cloud role names, live metrics, per-library instrumentation options and Azure AD authentication through a credential. It lists supported auto-instrumented libraries such as Requests, httpx, psycopg2, pymongo and redis. It is aimed at Python developers instrumenting services that send telemetry to Azure Application Insights.

Written from the project's SKILL.md and checked against it.

What it can do

  • One-line setupConfigures Application Insights with configure_azure_monitor(), reading the connection string from the environment.
  • Auto-instrumentationInstruments Flask, Django, FastAPI, Requests, urllib3, httpx, aiohttp, psycopg2, pymysql, pymongo and redis.
  • Custom tracesCreates spans with a tracer and sets custom attributes on them.
  • Custom metricsCreates OpenTelemetry counters and records values with dimensions.
  • Custom logsSends Python logging output, including errors with exception info, to Application Insights.
  • Trace samplingSets a sampling_ratio so only a fraction of requests are sampled.
  • Cloud role nameSets the service name through an OpenTelemetry Resource for the Application Map.
  • Live metricsEnables the Live Metrics stream with the enable_live_metrics option.
  • Per-library optionsTurns individual instrumentations on or off through instrumentation_options.
  • Azure AD authenticationPasses an Azure identity credential to configure_azure_monitor() for AAD auth.

What you need

  • Python
  • pip install of azure-monitor-opentelemetry
  • An Application Insights connection string
  • Azure identity package for optional AAD authentication

Try asking

  • Add Application Insights tracing to my Flask app with configure_azure_monitor()
  • Set a 10% trace sampling ratio for my Azure Monitor setup
  • Add a custom span and counter metric to my FastAPI service

Good to know

  • Configure once per process and do not initialize both Azure Monitor and Microsoft OpenTelemetry distros.
  • Supported libraries and defaults change by version, so confirm the installed distro.
  • Telemetry leaves the process, so redact secrets and personal data from logs and spans.
  • Trace sampling does not imply that metrics or all logs are sampled.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: skills/azure-monitor-opentelemetry-py/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md6 KB

Alternatives to azure-monitor-opentelemetry-py

All alternatives →
deploy-release-testvercel
94

Runs the full Next.js deployment test suite for an internal vercel/next.js pull request. It validates the commit's preview package, then dispatches the test_e2e_deploy_release.yml workflow. Meant for maintainers who explicitly ask for the entire suite.

AAA Skill 144k
deepeval-tracingconfident-ai
94

Instruments Python AI applications with DeepEval's native tracing so their execution appears span by span in Confident AI's Observatory. It is for developers building LLM apps, agents, RAG pipelines and chatbots.

AAA Skill 20k
azure-container-registry-cligithub
94

Manages Azure Container Registry through the az acr Azure CLI command group. It covers registries, images, cloud builds, ACR Tasks, tokens, geo-replication and networking. Built for developers and operators who work with ACR in Azure.

AAA Skill 42k
crabbox-appsopenclaw
94

Opens, runs, and shows apps on a temporary Crabbox machine, including native desktops and web previews. It is for OpenClaw users who want an app running and visible in their chat side panel.

AAA Skill 395k
gke-batch-hpcgoogle
94

Runs batch and HPC workloads on GKE using job queues and parallel processing. Aimed at teams running batch pipelines, HPC simulations, or ML training jobs on Google Kubernetes Engine.

AAA Skill 25k
gke-cost-analysisgoogle
94

Answers questions about GKE cluster and workload costs using BigQuery billing exports and live cluster metrics. Built for platform engineers and cloud teams who need to analyze and diagnose GKE spend.

AAA Skill 25k

Compare with deploy-release-test, deepeval-tracing or azure-container-registry-cli

azure-monitor-opentelemetry-py: common questions

How do I connect Python to Application Insights with OpenTelemetry?

Call configure_azure_monitor() early in the application, before importing instrumented libraries. It reads the connection string from APPLICATIONINSIGHTS_CONNECTION_STRING or from a connection_string parameter.

Which Python frameworks and libraries are auto-instrumented?

The source lists Flask, Django, FastAPI, Requests, urllib3, httpx, aiohttp, psycopg2, pymysql, pymongo and redis, all producing traces. The source says to confirm optional instrumentations in the installed version.

Can I reduce how much telemetry is sent?

The source shows the sampling_ratio parameter for trace sampling and instrumentation_options to disable specific libraries. It also notes that sampling does not apply to metrics or all logs.

How do I install azure-monitor-opentelemetry-py?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is azure-monitor-opentelemetry-py free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is azure-monitor-opentelemetry-py safe to use?

It scores 89 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to azure-monitor-opentelemetry-py?

Similar skills: deploy-release-test, deepeval-tracing, azure-container-registry-cli, crabbox-apps.

azure-monitor-opentelemetry-py Install

Add to stack

Loading.