opentelemetry-resourcedetector-docker
An OpenTelemetry package to populates Resource attributes from Docker containers
What it is and what it does
This package is a resource detector plugin for OpenTelemetry that automatically discovers and extracts Docker container metadata—such as container ID—and attaches it as Resource attributes to your telemetry data. It integrates with the OpenTelemetry SDK's resource aggregation system, allowing you to pass it alongside other detectors to build a complete resource context.
The package is designed to run inside Docker containers and populate telemetry with container-specific identifiers. It depends on opentelemetry-sdk and opentelemetry-semantic-conventions, and has low install friction. However, it has been abandoned since September 2022 with no subsequent maintenance, so it may not work with newer OpenTelemetry versions or evolving container runtime standards.
Use it for:
- Automatically tag traces and metrics with Docker container IDs in containerized applications to correlate observability data with specific containers.
- Enrich OpenTelemetry Resource attributes in Kubernetes or Docker Compose deployments without manual configuration.
- Populate container metadata in telemetry backends to enable filtering and grouping by container identity.
- Integrate Docker resource detection into a multi-detector resource aggregation pipeline for comprehensive context.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Extracts Docker container metadata and populates OpenTelemetry Resource attributes automatically, enabling telemetry systems to identify and tag traces and metrics with container-specific information.
Yes, if your observability stack is stable and you are running in Docker with a compatible OpenTelemetry SDK version. The low install friction and permissive license make it straightforward to adopt. No, if you require active maintenance, expect to upgrade OpenTelemetry frequently, or need support for newer container runtimes—the abandoned status and lack of updates since 2022 create risk in evolving environments.
Install
opentelemetry-resourcedetector-docker on PyPI
pip
pip install opentelemetry-resourcedetector-dockeruv
uv add opentelemetry-resourcedetector-dockerpoetry
poetry add opentelemetry-resourcedetector-dockerInstalling opentelemetry-resourcedetector-docker
Before you install
Low install friction with only two runtime dependencies. However, the package is abandoned—last release was 2022-09-18 with no commits since, and the repository shows no active maintenance. Use only if your observability stack is stable and you do not expect upstream updates.
License in practice
Licensed under MIT (permissive), so you may use, modify, and distribute it freely with minimal restrictions—suitable for commercial and private projects.
Quickstart
pip install opentelemetry-resourcedetector-docker
from opentelemetry.sdk.resources import get_aggregated_resources
from opentelemetry_resourcedetector_docker import DockerResourceDetector
resource = get_aggregated_resources([DockerResourceDetector()])
Requires opentelemetry-sdk and opentelemetry-semantic-conventions as runtime dependencies; intended for use within a containerized environment where Docker metadata is available.
Verify before relying
- Whether the package correctly detects Docker container IDs and metadata on all container runtimes (Docker, containerd, etc.)
- Compatibility with recent OpenTelemetry SDK versions released after 2022-09-18
- Whether abandoned status affects reliability in production observability pipelines
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — opentelemetry-sdk, opentelemetry-semantic-conventions |
| Maintenance | abandoned — 1,426 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,708,391/month — #3,631 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: opentelemetry_resourcedetector_docker-0.4.0-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-processExtracts process-level metadata and populates…
permissive · top 5,000 on PyPI
opentelemetry-container-distroProvides an OpenTelemetry distribution that…
permissive · top 5,000 on PyPI
opentelemetry-resourcedetector-kubernetesDetects and populates OpenTelemetry Resource…
permissive · top 5,000 on PyPI
opentelemetry-resource-detector-azureProvides OpenTelemetry resource detectors that…
permissive · top 5,000 on PyPI
opentelemetry-sdk-extension-awsProvides OpenTelemetry SDK components to make…
permissive · top 5,000 on PyPI
opentelemetry-resourcedetector-gcpAutomatically detects and reports GCP resource…
permissive · top 5,000 on PyPI
openfeature-hooks-opentelemetryAutomatically captures feature flag evaluations…
permissive · top 15,000 on PyPI
opentelemetry-instrumentation-loggingIntegrates Python's standard logging module…
permissive · top 1,000 on PyPI
container-inspectorAnalyzes Docker images, containers, and virtual…
permissive · top 15,000 on PyPI