opentelemetry-resource-detector-azure
Azure Resource Detector for OpenTelemetry
What it is and what it does
This package extends OpenTelemetry's resource detection framework with Azure-specific detectors that automatically populate trace metadata from your Azure deployment environment. When initialized, the detectors read Azure environment variables and metadata service responses to populate standard OpenTelemetry resource attributes like service.name, cloud.platform, cloud.region, and host.id—eliminating manual configuration of these fields in Azure-hosted applications.
The package supports three Azure compute platforms: App Service (web apps), Functions (serverless), and Virtual Machines. Each detector maps Azure-specific metadata to OpenTelemetry's semantic conventions for cloud resources, allowing traces to carry rich context about where they originated without requiring application code changes. It integrates directly with opentelemetry-sdk's TracerProvider and resource aggregation system.
Use it for:
- Automatically tag traces from Azure App Service deployments with service name, region, and resource group without manual configuration.
- Correlate telemetry from Azure Functions with function instance IDs and memory limits for serverless workload analysis.
- Enrich VM-based application traces with host metadata (VM size, scale set name, OS type) from the Azure Metadata Service.
- Build multi-cloud observability by standardizing resource attributes across Azure and non-Azure services using OpenTelemetry conventions.
- Simplify trace filtering and aggregation in observability backends by ensuring consistent cloud.provider and cloud.platform attributes.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides OpenTelemetry resource detectors that automatically identify and tag telemetry data with Azure environment metadata from App Service, Functions, and Virtual Machines.
Yes. Install this if you run Python applications on Azure and use OpenTelemetry for tracing. It eliminates boilerplate resource configuration, has no known vulnerabilities, low install friction, and active maintenance. Skip it only if you don't use OpenTelemetry or don't need Azure-specific metadata in your traces.
Install
opentelemetry-resource-detector-azure on PyPI
pip
pip install opentelemetry-resource-detector-azureuv
uv add opentelemetry-resource-detector-azurepoetry
poetry add opentelemetry-resource-detector-azureInstalling opentelemetry-resource-detector-azure
Before you install
Low friction: pure Python wheel with a single runtime dependency on opentelemetry-sdk. Actively maintained with recent commits and no known vulnerabilities.
License in practice
Permissive Apache license; no restrictions on commercial or proprietary use.
Quickstart
pip install opentelemetry-resource-detector-azure
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.resource.detector.azure.app_service import AzureAppServiceResourceDetector
from opentelemetry.sdk.resources import get_aggregated_resources
trace_provider = TracerProvider(
resource=get_aggregated_resources([AzureAppServiceResourceDetector()])
)
Requires Python 3.8 or later; detectors rely on Azure environment variables (WEBSITE_SITE_NAME, etc.) or Azure Metadata Service availability when running on Azure resources.
Verify before relying
- Whether detectors gracefully handle missing Azure environment variables or metadata service unavailability.
- Performance overhead of resource detection during tracer initialization.
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — opentelemetry-sdk |
| Maintenance | actively maintained — 820 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 16,032,000/month — #1,166 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: opentelemetry_resource_detector_azure-0.1.5-py3-none-any.whl
Tags
More Monitoring packages
Wraps any iterable to display a real-time…
copyleft · top 100 on PyPI
opentelemetry-semantic-conventionsProvides generated Python code for…
permissive · top 100 on PyPI
opentelemetry-sdkProvides the reference implementation of the…
permissive · top 100 on PyPI
opentelemetry-apiProvides the abstract API and interfaces for…
permissive · top 100 on PyPI
opentelemetry-exporter-otlp-proto-httpExports OpenTelemetry observability data to an…
permissive · top 1,000 on PyPI
opentelemetry-instrumentationProvides automatic instrumentation commands and…
permissive · top 1,000 on PyPI
opentelemetry-resource-detector-containeridDetects and registers container runtime…
permissive · top 15,000 on PyPI
opentelemetry-resourcedetector-gcpAutomatically detects and reports GCP resource…
permissive · top 5,000 on PyPI
opentelemetry-resourcedetector-dockerExtracts Docker container metadata and…
permissive · top 5,000 on PyPI
opentelemetry-resourcedetector-processExtracts process-level metadata and populates…
permissive · top 5,000 on PyPI
opentelemetry-sdk-extension-awsProvides OpenTelemetry SDK components to make…
permissive · top 5,000 on PyPI
opentelemetry-resourcedetector-kubernetesDetects and populates OpenTelemetry Resource…
permissive · top 5,000 on PyPI
azure-core-tracing-opentelemetryIntegrates Azure SDK clients with OpenTelemetry…
unclear · top 5,000 on PyPI
azure-monitor-events-extensionSends custom events to Azure Application…
permissive · top 15,000 on PyPI
opentelemetry-container-distroProvides an OpenTelemetry distribution that…
permissive · top 5,000 on PyPI
azure-monitor-opentelemetry-exporterExports OpenTelemetry traces, metrics, and logs…
permissive · top 1,000 on PyPI