-
Notifications
You must be signed in to change notification settings - Fork 907
Description
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:
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/