Is your feature request related to a problem?
Detecting the id of the container that holds the service instrumented with otel allows end-users to correlate container issues with service issues.
Describe the solution you'd like
I see some of that implemented in the AWS Extension, but I was wondering if there's a way to have this standalone.
Describe alternatives you've considered
Injecting the container id via an environment variable is always possible.
Additional context
Semantic conventions for container resource: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/container.md
A similar implementation exists for Java, JS, .NET & Go already. The .JS is the most advanced since it also works with containers when cgroup v2 is used:
https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/detectors/node/opentelemetry-resource-detector-container/src/detectors/ContainerDetector.ts
We are also currently trying at opentelemetry.io to have per-language pages on resources and used the container detection as an example besides using the environment variable:
open-telemetry/opentelemetry.io#1773
and
https://opentelemetry.io/docs/instrumentation/js/resources/
Is your feature request related to a problem?
Detecting the id of the container that holds the service instrumented with otel allows end-users to correlate container issues with service issues.
Describe the solution you'd like
I see some of that implemented in the AWS Extension, but I was wondering if there's a way to have this standalone.
Describe alternatives you've considered
Injecting the container id via an environment variable is always possible.
Additional context
Semantic conventions for container resource: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/container.md
A similar implementation exists for Java, JS, .NET & Go already. The .JS is the most advanced since it also works with containers when cgroup v2 is used:
https://github.com/open-telemetry/opentelemetry-js-contrib/blob/main/detectors/node/opentelemetry-resource-detector-container/src/detectors/ContainerDetector.ts
We are also currently trying at opentelemetry.io to have per-language pages on resources and used the container detection as an example besides using the environment variable:
open-telemetry/opentelemetry.io#1773
and
https://opentelemetry.io/docs/instrumentation/js/resources/