skillfed

azure-monitor-opentelemetry

Microsoft Azure Monitor Opentelemetry Distro Client Library for Python

azure-monitor-opentelemetry v1.8.9 20.9M downloads/30d#1,023 on PyPI5,588
Permissive license MIT License Active released

What it is and what it does

Azure Monitor Opentelemetry Distro is a pre-configured bundle of the OpenTelemetry SDK and Azure Monitor exporters designed to simplify telemetry collection in Python applications. It automatically instruments popular web frameworks (Django, FastAPI, Flask), database drivers (psycopg2), and HTTP libraries (requests, urllib, urllib3) to capture traces, metrics, and logs without requiring manual instrumentation of each library. The distro sends all collected telemetry directly to Azure Monitor.

You configure it with a single call to `configure_azure_monitor()`, passing your Application Insights connection string and optional settings for sampling, performance counters, live metrics, and which instrumentations to enable or disable. The package handles resource detection, span processing, and metric aggregation internally, letting you focus on your application code rather than wiring up observability infrastructure.

Use it for:

  • Instrument a Django or FastAPI web service to automatically capture HTTP request traces and send them to Azure Monitor.
  • Enable distributed tracing across microservices by configuring the distro on each service to report traces to a shared Application Insights resource.
  • Collect database query spans from psycopg2 and HTTP client spans from requests to correlate slow endpoints with underlying calls.
  • Set up live metrics and performance counters on a production application to monitor CPU, memory, and request rates in real time.
  • Disable specific instrumentations in a multi-framework application to avoid double-instrumentation or reduce overhead.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Bundles OpenTelemetry SDK and Azure Monitor exporters to instrument Python applications for automatic collection and reporting of traces, metrics, and logs to Azure Monitor with a single configuration call.

Yes, if you are already using Azure Monitor and need observability in a Python application. The distro eliminates boilerplate by bundling OpenTelemetry and Azure exporters, and it is actively maintained with no known vulnerabilities. The trade-off is a large dependency tree (13 runtime packages) that pulls in instrumentations you may not use; if you need only selective instrumentation or are not on Azure, consider using OpenTelemetry components directly.

Install

azure-monitor-opentelemetry on PyPI

pip

pip install azure-monitor-opentelemetry

uv

uv add azure-monitor-opentelemetry

poetry

poetry add azure-monitor-opentelemetry

Installing azure-monitor-opentelemetry

Before you install

Low friction install with a pure-Python wheel. Actively maintained with a recent release. Carries 13 runtime dependencies including the OpenTelemetry SDK and instrumentations for Django, FastAPI, Flask, psycopg2, requests, urllib, urllib3, and logging—all pulled in automatically.

License in practice

MIT License permits commercial and private use with minimal restrictions, making it safe to adopt in most projects.

Quickstart

pip install azure-monitor-opentelemetry

from azure.monitor.opentelemetry import configure_azure_monitor

configure_azure_monitor(connection_string="<your-connection-string>")

Requires Python 3.8 or later and an Azure subscription with an Application Insights resource and its connection string.

Verify before relying

  • Whether automatic instrumentation for frameworks beyond those listed is possible without manual setup.
  • Performance overhead of live metrics and performance counters when enabled by default.
  • Stability guarantees for the bundled OpenTelemetry instrumentations, which the description notes are in beta.

Package facts

License MIT License (permissive)
Python support supports the current Python release (>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies 13 — azure-core, azure-core-tracing-opentelemetry, azure-monitor-opentelemetry-exporter, opentelemetry-sdk, opentelemetry-instrumentation-django, opentelemetry-instrumentation-fastapi, opentelemetry-instrumentation-flask, opentelemetry-instrumentation-psycopg2, opentelemetry-instrumentation-requests, opentelemetry-instrumentation-urllib, opentelemetry-instrumentation-urllib3, opentelemetry-instrumentation-logging, opentelemetry-resource-detector-azure
Maintenance actively maintained — 44 days since the last release
Last repo commit
First released
Downloads 20,906,017/month — #1,023 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: azure_monitor_opentelemetry-1.8.9-py3-none-any.whl

Keywords: azure, azure sdk

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Tags

azure monitor telemetry pythonopentelemetry azure exporterapplication insights instrumentationdistributed tracing azurepython observability azureapm azure monitoropentelemetry distro azure
observabilityazure-integrationdistributed-tracing

More Monitoring packages

tqdm

Wraps any iterable to display a real-time…

copyleft · top 100 on PyPI

opentelemetry-semantic-conventions

Provides generated Python code for…

permissive · top 100 on PyPI

opentelemetry-sdk

Provides the reference implementation of the…

permissive · top 100 on PyPI

opentelemetry-api

Provides the abstract API and interfaces for…

permissive · top 100 on PyPI

opentelemetry-exporter-otlp-proto-http

Exports OpenTelemetry observability data to an…

permissive · top 1,000 on PyPI

opentelemetry-instrumentation

Provides automatic instrumentation commands and…

permissive · top 1,000 on PyPI

azure-monitor-opentelemetry-exporter

Exports OpenTelemetry traces, metrics, and logs…

permissive · top 1,000 on PyPI

microsoft-opentelemetry

Provides a unified OpenTelemetry distribution…

permissive · top 15,000 on PyPI

azure-monitor-events-extension

Sends custom events to Azure Application…

permissive · top 15,000 on PyPI

azure-core-tracing-opentelemetry

Integrates Azure SDK clients with OpenTelemetry…

unclear · top 5,000 on PyPI

opencensus-ext-azure

Exports logs, metrics, and traces from Python…

permissive · top 5,000 on PyPI

applicationinsights

Sends telemetry events, metrics, and traces to…

permissive · top 5,000 on PyPI

opentelemetry-container-distro

Provides an OpenTelemetry distribution that…

permissive · top 5,000 on PyPI

azure-cli-telemetry

Collects and uploads telemetry data for the…

permissive · top 5,000 on PyPI

opentelemetry-distro

Provides a Python distribution package for…

permissive · top 1,000 on PyPI

azureml-telemetry

Collects telemetry data from Python code by…

unclear · top 15,000 on PyPI