An OpenTelemetry package to populate Resource attributes from Docker containers
Maintained. Last release 11 days ago, commits in 3 of the last 26 weeks. Weaker on commit activity and release cadence.
$
pip install opentelemetry-resourcedetector-dockeropentelemetry-resourcedetector-docker
An OpenTelemetry package to populate Resource attributes from Docker containers.
Usage
from opentelemetry.sdk.resources import get_aggregated_resources
from opentelemetry_resourcedetector_docker import DockerResourceDetector
...
resource = get_aggregated_resources([
DockerResourceDetector(),
SomeOtherResourceDetector()
])
... pass the returned `resource` to a TracerProvider, for example ...