You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In 2021 linux distributions rolled out cgroup v2.
This resulted in a change to how docker container ID is exposed.
In cgroup v1, we read /proc/self/cgroup and pattern match to find the container id.
This results in the agent not sending container id in the connect payload for utilization metrics on hosts using cgroup v2.
Feature Description
The same information in cgroup c2 can be found in /proc/self/mountinfo through a similar pattern match.
The feature request is to support both cgroup v2 and cgroup v1
A reference can be found here with the open telemetry project: open-telemetry/opentelemetry-java-instrumentation#7167
Describe Alternatives
There is an open issue on the open container initiative site to address this in a more generalized way so that changes like this do not break this as easily.
The main alternative would be to wait for this open issue to play out and use that solution. opencontainers/runtime-spec#1105
Because this is used for for utilization calculations, we need to move faster on implementing a solution. Also, there is no guarantee that a generalized abstraction will be implemented.
Additional context
This information is used for utilization and is provided as part of the connect payload. An agent-spec issue as also been created, as this impacts all language agents.
The issue
In 2021 linux distributions rolled out cgroup v2.
This resulted in a change to how docker container ID is exposed.
In cgroup v1, we read
/proc/self/cgroup
and pattern match to find the container id.newrelic-java-agent/newrelic-agent/src/main/java/com/newrelic/agent/utilization/DockerData.java
Line 32 in e9f8ce7
This results in the agent not sending container id in the connect payload for utilization metrics on hosts using cgroup v2.
Feature Description
The same information in cgroup c2 can be found in
/proc/self/mountinfo
through a similar pattern match.The feature request is to support both cgroup v2 and cgroup v1
A reference can be found here with the open telemetry project:
open-telemetry/opentelemetry-java-instrumentation#7167
Describe Alternatives
There is an open issue on the open container initiative site to address this in a more generalized way so that changes like this do not break this as easily.
The main alternative would be to wait for this open issue to play out and use that solution.
opencontainers/runtime-spec#1105
Because this is used for for utilization calculations, we need to move faster on implementing a solution. Also, there is no guarantee that a generalized abstraction will be implemented.
Additional context
This information is used for utilization and is provided as part of the connect payload. An agent-spec issue as also been created, as this impacts all language agents.
There's additional helpful information and links on this stackoverflow post:
https://stackoverflow.com/questions/68816329/how-to-get-docker-container-id-from-within-the-container-with-cgroup-v2
The text was updated successfully, but these errors were encountered: