skillfed

opentelemetry-resource-detector-azure

Azure Resource Detector for OpenTelemetry

opentelemetry-resource-detector-azure v0.1.5 16.0M downloads/30d#1,166 on PyPI1,086
Permissive license Active released

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-azure

uv

uv add opentelemetry-resource-detector-azure

poetry

poetry add opentelemetry-resource-detector-azure

Installing 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

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

opentelemetry azure resource detectorazure app service tracingazure vm telemetry metadataopentelemetry azure integrationcloud resource detection azureazure functions tracingdistributed tracing 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

opentelemetry-resource-detector-containerid

Detects and registers container runtime…

permissive · top 15,000 on PyPI

opentelemetry-resourcedetector-gcp

Automatically detects and reports GCP resource…

permissive · top 5,000 on PyPI

opentelemetry-resourcedetector-docker

Extracts Docker container metadata and…

permissive · top 5,000 on PyPI

opentelemetry-resourcedetector-process

Extracts process-level metadata and populates…

permissive · top 5,000 on PyPI

opentelemetry-sdk-extension-aws

Provides OpenTelemetry SDK components to make…

permissive · top 5,000 on PyPI

opentelemetry-resourcedetector-kubernetes

Detects and populates OpenTelemetry Resource…

permissive · top 5,000 on PyPI

azure-core-tracing-opentelemetry

Integrates Azure SDK clients with OpenTelemetry…

unclear · top 5,000 on PyPI

azure-monitor-events-extension

Sends custom events to Azure Application…

permissive · top 15,000 on PyPI

opentelemetry-container-distro

Provides an OpenTelemetry distribution that…

permissive · top 5,000 on PyPI

azure-monitor-opentelemetry-exporter

Exports OpenTelemetry traces, metrics, and logs…

permissive · top 1,000 on PyPI