--- id: opentelemetry-resourcedetector-kubernetes version: "0.3.0" license: unclear license_treatment: permissive maintenance: abandoned --- # opentelemetry-resourcedetector-kubernetes — An OpenTelemetry package to populates Resource attributes for Kubernetes pods License: permissive · Maintenance: abandoned · Downloads: 1.8M/mo ## What it is and what it does This package provides resource detectors for OpenTelemetry that extract Kubernetes pod metadata and attach it to trace resources. It implements three detector classes: a base KubernetesResourceDetector that always populates container.runtime, container.id, and k8s.pod.uid; and two variants that use the Kubernetes Downward API to read additional metadata either from environment variables or from mounted volume files. You pass one of these detectors to OpenTelemetry's get_aggregated_resources() function, which returns a Resource object you then pass to a TracerProvider. The package depends on opentelemetry-sdk and opentelemetry-semantic-conventions, and requires Python 3.8 or later. It is designed specifically for workloads running inside Kubernetes pods and will not detect meaningful metadata outside that environment. The Downward API variants require explicit configuration in your Kubernetes manifests to expose pod metadata as either environment variables or volume-mounted files. Use it for: - Automatically tag traces with the Kubernetes pod UID and container ID for correlation in observability platforms. - Populate k8s.namespace.name and k8s.pod.name in traces by configuring Downward API environment variables in your pod spec. - Mount Kubernetes metadata as files and read namespace, pod name, and other attributes via the volume-based Downward API detector. - Integrate Kubernetes pod context into OpenTelemetry traces without manual hardcoding of pod identifiers. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Detects and populates OpenTelemetry Resource attributes specific to Kubernetes pods, including container ID, pod UID, and namespace/pod name via the Kubernetes Downward API. No. The package is abandoned (last release 2022-09-18, no commits since) and will receive no maintenance or updates. While it has low install friction and permissive licensing, the lack of maintenance means compatibility with current OpenTelemetry versions is uncertain and bugs will not be fixed. If you need Kubernetes resource detection for OpenTelemetry, seek an actively maintained alternative or verify this package still works with your current dependencies. ## Install pip install opentelemetry-resourcedetector-kubernetes uv add opentelemetry-resourcedetector-kubernetes poetry add opentelemetry-resourcedetector-kubernetes ## Installing opentelemetry-resourcedetector-kubernetes Before you install: Low install friction with only two runtime dependencies (opentelemetry-sdk and opentelemetry-semantic-conventions). However, the package is abandoned—last release was 2022-09-18 with no commits since then—so expect no maintenance, bug fixes, or updates. License in practice: Licensed under MIT (permissive), so you can use it freely in commercial and private projects without copyleft obligations. Quickstart: pip install opentelemetry-resourcedetector-kubernetes from opentelemetry.sdk.resources import get_aggregated_resources from opentelemetry_resourcedetector_kubernetes import KubernetesResourceDetector resource = get_aggregated_resources([KubernetesResourceDetector()]) Must be running inside a Kubernetes pod; the detector will not populate meaningful attributes outside that environment. Verify before relying: - Whether the package remains compatible with current versions of opentelemetry-sdk and opentelemetry-semantic-conventions despite being unmaintained. - Whether Kubernetes Downward API behavior or OpenTelemetry semantic conventions have changed since the last release in 2022. ## Package facts - License: not declared (permissive) - Python support: supports_current - Install friction: low - Maintenance: abandoned - Downloads: 1.8M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags kubernetes resource detector opentelemetry, k8s pod attributes tracing, opentelemetry kubernetes metadata, container resource detection, kubernetes downward api telemetry, pod uid namespace detection, otel k8s resource attributes, kubernetes, observability, abandoned [View on SkillFed](https://skillfed.io/packages/opentelemetry-resourcedetector-kubernetes) · [View on PyPI](https://pypi.org/project/opentelemetry-resourcedetector-kubernetes/)