--- id: azure-monitor-opentelemetry version: "1.8.9" license: MIT License license_treatment: permissive maintenance: active --- # azure-monitor-opentelemetry — Microsoft Azure Monitor Opentelemetry Distro Client Library for Python License: permissive · Maintenance: active · Downloads: 20.9M/mo ## 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 above — 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 pip install azure-monitor-opentelemetry uv add azure-monitor-opentelemetry 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="") 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_current - Install friction: low - Maintenance: active - Downloads: 20.9M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags azure monitor telemetry python, opentelemetry azure exporter, application insights instrumentation, distributed tracing azure, python observability azure, apm azure monitor, opentelemetry distro azure, observability, azure-integration, distributed-tracing [View on SkillFed](https://skillfed.io/packages/azure-monitor-opentelemetry) · [View on PyPI](https://pypi.org/project/azure-monitor-opentelemetry/)