# 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](https://github.com/open-telemetry/opentelemetry-go/issues/3501).

## Java

Has `container_id` support.

## JavaScript and Node.js

Has `container_id` support.

Use [OpenTelemetry Resource Detector for Container](https://www.npmjs.com/package/@opentelemetry/resource-detector-container). Pinned to version 0.2.2. Versions 0.3.* does not work; see [opentelemetry-resource-detector-container does not detect the container id on 0.3.4/0.3.7](https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2073).

## 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](https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/resource/opentelemetry-resource-detector-container) to pypi. As a workaround, use the following in `requirements.txt` file:

```console
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:

```yaml
OTEL_EXPERIMENTAL_RESOURCE_DETECTORS=container
```

## Ruby

Has `container_id` support.

Use [OpenTelemetry::Resource::Detector::Container](https://github.com/open-telemetry/opentelemetry-ruby-contrib/blob/main/resources/container/README.md).

## Rust

No `container_id` support.

Refer to code and documentation for [OpenTelemetry Resource Detectors](https://github.com/open-telemetry/opentelemetry-rust-contrib/tree/main/opentelemetry-resource-detectors/src)
