From 68a07af89ba3a8f37af298ecbcf662aa45f04e3c Mon Sep 17 00:00:00 2001 From: maryliag Date: Thu, 28 Mar 2024 11:32:03 -0400 Subject: [PATCH 1/2] chore: update readme for container resource detector Update README of Container Resource Detector to clarify the source of the data and add Semantic Conventions. Part Of #2055 Part Of #2025 Signed-off-by: maryliag --- .../README.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/detectors/node/opentelemetry-resource-detector-container/README.md b/detectors/node/opentelemetry-resource-detector-container/README.md index 8e8baa4e45..1438c41f83 100644 --- a/detectors/node/opentelemetry-resource-detector-container/README.md +++ b/detectors/node/opentelemetry-resource-detector-container/README.md @@ -26,9 +26,17 @@ const resource = await detectResources({ const tracerProvider = new NodeTracerProvider({ resource }); ``` -## Available detectors +## Available detectors & Semantic Conventions -- `containerDetector`: Populates `container.id` for processes running on containers supporting : docker( cgroup v1 or v2 ) or with containerd +This package uses `@opentelemetry/semantic-conventions` version `1.22+`, which implements Semantic Convention [Version 1.7.0](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.7.0/semantic_conventions/README.md) + +### ContainerDetector + +Populates `container.id` for processes running on containers supporting : docker( cgroup v1 or v2 ) or with containerd + +| Resource Attribute | Description | Notes | +|---------------------|-----------------------------------------------------------------| ------------------- | +| container.id | Value parsed from file `/proc/self/cgroup` (cgroup v1). If it doesn't exist, parse the value from file `/proc/self/mountinfo` (cgroup v2)| Key: `SEMRESATTRS_CONTAINER_ID` | ## Useful links From 207886f424a9e744fd2b7b285d34be7ba1ff6b44 Mon Sep 17 00:00:00 2001 From: maryliag Date: Tue, 9 Apr 2024 09:10:48 -0400 Subject: [PATCH 2/2] remove notes colum --- .../opentelemetry-resource-detector-container/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/detectors/node/opentelemetry-resource-detector-container/README.md b/detectors/node/opentelemetry-resource-detector-container/README.md index 1438c41f83..f798241a28 100644 --- a/detectors/node/opentelemetry-resource-detector-container/README.md +++ b/detectors/node/opentelemetry-resource-detector-container/README.md @@ -26,7 +26,7 @@ const resource = await detectResources({ const tracerProvider = new NodeTracerProvider({ resource }); ``` -## Available detectors & Semantic Conventions +## Available detectors This package uses `@opentelemetry/semantic-conventions` version `1.22+`, which implements Semantic Convention [Version 1.7.0](https://github.com/open-telemetry/opentelemetry-specification/blob/v1.7.0/semantic_conventions/README.md) @@ -34,9 +34,9 @@ This package uses `@opentelemetry/semantic-conventions` version `1.22+`, which i Populates `container.id` for processes running on containers supporting : docker( cgroup v1 or v2 ) or with containerd -| Resource Attribute | Description | Notes | -|---------------------|-----------------------------------------------------------------| ------------------- | -| container.id | Value parsed from file `/proc/self/cgroup` (cgroup v1). If it doesn't exist, parse the value from file `/proc/self/mountinfo` (cgroup v2)| Key: `SEMRESATTRS_CONTAINER_ID` | +| Resource Attribute | Description | +|--------------------|------------------------------------------------------------------------------------------------------------------------------------------| +| `container.id` | Value parsed from file `/proc/self/cgroup` (cgroup v1). If it doesn't exist, parse the value from file `/proc/self/mountinfo` (cgroup v2)| ## Useful links