--- id: microsoft-opentelemetry version: "1.3.7" license: unclear license_treatment: permissive maintenance: active --- # microsoft-opentelemetry — Minimal template for the Microsoft OpenTelemetry distro for Python License: permissive · Maintenance: active · Downloads: 726.9K/mo ## What it is and what it does microsoft-opentelemetry is a Microsoft-maintained OpenTelemetry distribution that bundles the SDK, instrumentation plugins, and exporters into a single package. It abstracts away the complexity of configuring tracing, metrics, and logging pipelines by providing a single entry point—the `use_microsoft_opentelemetry()` function—that handles setup for Azure Monitor, OTLP-compatible backends, and Microsoft Agent 365 simultaneously. The package automatically instruments popular Python frameworks (Django, FastAPI, Flask, etc.) and HTTP libraries (requests, httpx, urllib3, aiohttp) out of the box. It supports environment-variable-based configuration for sampling strategies, offline storage for Azure Monitor, and flexible token resolution for Agent 365 authentication. Developers can enable or disable individual pipelines (logging, tracing, metrics) and customize exporters, span processors, and metric readers as needed. Use it for: - Enable distributed tracing across a Django or FastAPI application with a single function call, automatically capturing HTTP spans and database queries. - Export telemetry to Azure Monitor with offline retry storage for resilience in unreliable network conditions. - Send traces to both Azure Monitor and an OTLP-compatible backend (e.g., Jaeger, Grafana Loki) simultaneously for multi-destination observability. - Instrument AI agent applications with Agent 365 telemetry while propagating trace context to Azure Monitor for end-to-end visibility. - Configure trace sampling (fixed percentage or rate-limited) via environment variables without code changes. - Collect and correlate application logs, traces, and metrics from a single instrumentation setup. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides a unified OpenTelemetry distribution for Python that simplifies instrumentation across Azure Monitor, OTLP-compatible backends, and Microsoft Agent 365 integrations. Yes, if you are building on Azure or need multi-destination observability. The package eliminates boilerplate for OpenTelemetry setup and provides seamless integration with Azure Monitor and Agent 365. The 24 runtime dependencies are substantial but necessary for the breadth of instrumentation it offers. Install it if you want a batteries-included distribution; skip it if you need minimal dependencies or are not using Azure. ## Install pip install microsoft-opentelemetry uv add microsoft-opentelemetry poetry add microsoft-opentelemetry ## Installing microsoft-opentelemetry Before you install: Low install friction with a pure Python wheel. Active maintenance—released 2026-08-05, last commit 2026-08-13. Requires Python 3.10 or later and pulls in 24 runtime dependencies, including the full OpenTelemetry SDK and instrumentation libraries for Django, FastAPI, Flask, and other frameworks. License in practice: MIT license (permissive). No restrictions on commercial or private use. Quickstart: pip install microsoft-opentelemetry from microsoft.opentelemetry import use_microsoft_opentelemetry use_microsoft_opentelemetry( enable_azure_monitor=True, azure_monitor_connection_string="InstrumentationKey=...;IngestionEndpoint=...", ) Requires Python 3.10 or later. Azure Monitor export requires an Application Insights resource and connection string or Azure credentials. Verify before relying: - Whether the 24 runtime dependencies are all required or if subsets can be installed conditionally based on enabled exporters. - Performance overhead of automatic instrumentation across all included libraries when only a subset is needed. ## Package facts - License: not declared (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 726.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags opentelemetry distribution python, azure monitor instrumentation, distributed tracing setup, observability middleware, application performance monitoring, otlp exporter configuration, agent telemetry collection, observability, azure-integration, instrumentation [View on SkillFed](https://skillfed.io/packages/microsoft-opentelemetry) · [View on PyPI](https://pypi.org/project/microsoft-opentelemetry/)