Container Resource Attributes Collection for Telemetry Data

For Docker environments, some of the Kfuse APM UI relies on the container_id attribute that attaches to the Resource attributes of the telemetry data received by Kloudfuse. In OpenTelemetry, this attachment is accomplished at the language SDK.

The following list provides the necessary information for you to properly configure your deployment when running on a Docker CGroupv2 environment.

.Net

Has container_id support.

C++

No container_id support.

Go

No container_id support.

Pending unmerged OpenTelemetry PR Detect container id on cgroup v2 #3501.

Java

Has container_id support.

JavaScript and Node.js

Has container_id support.

Kotlin

Has container_id support.

Uses same sdk as java.

PHP

Has container_id support.

Python

Has container_id support.

Pending publication of resource/opentelemetry-resource-detector-container to pypi. As a workaround, use the following in requirements.txt file:

opentelemetry-resource-detector-container @ git+https://github.com/open-telemetry/opentelemetry-python-contrib.git@0.43b0hotfix#subdirectory=resource/opentelemetry-resource-detector-container

If using automatic instrumentation, add the following environment variable:

OTEL_EXPERIMENTAL_RESOURCE_DETECTORS=container
Ruby

Has container_id support.

Rust

No container_id support.

Refer to code and documentation for OpenTelemetry Resource Detectors