-
Notifications
You must be signed in to change notification settings - Fork 238
Description
Implement elastic/apm#22
The task is to see if the /proc/self/cgroup file exists, if so, get the Docker container ID from it and add it to system.container.id in the metadata event. It should read the ID on startup in a blocking way so that we have it available when the first metadata event is generated.
There's already an npm module that gets this ID, but it requires Node.js 7.8+ and it doesn't allow for synchronous reading. The reasons for the Node 7.8+ requirement is because of a unnecessary feature whos use-case escapes me. So unless we can get the author to change a few things, we're probably better of forking this and releasing a revised version.
Update: There's another module called docker-id which does support sync loading and supports earlier versions of Node.js. We should probably just use that.