-
Notifications
You must be signed in to change notification settings - Fork 123
Description
Agents should try to read the current container ID from the local filesystem. Elasticsearch already does this.
There's previously been discussion around issues that could arise because the agent could be blocked while fetching this information. I'm not too concerned about blocking the agent startup for a little bit while we check if the file exists and read/parse it. It should only take a few milliseconds. If we start supporting AWS Lambda and similar we could skip the check outright based on an environment variable that is automatically set by the provider.
There are some complications involved in parsing the file so it would be nice if one of the agents buildt a reference implementation that others can take model their own implementation on.
Pleas add the field to metadata as system.container.id.
The field will end up in Elasticsearch as container.id: https://github.com/elastic/ecs/blob/master/schemas/container.yml#L19-L23
@elastic/apm-agent-devs Please link your issue or PR and then mark the checkbox when the implementation is merged:
- - Java - Read docker container id from filesystem apm-agent-java#325
- - Python Add docker container metadata to system data apm-agent-python#346
- - Ruby - Read docker container id from filesystem apm-agent-ruby#253
- - Go - Add container ID to metadata apm-agent-go#328
- - dotNet - Send container.id in system. apm-agent-dotnet#238
- - Node.js - Add Docker container ID to metadata apm-agent-nodejs#693
- - APM Server - Allow APM Server to receive k8s/container information from agents apm-server#1621