When using very minimal container images like the distroless, the hostname command line tool that our agents use to capture the host name is missing and can't be used.
When no value is captured for host name, the most obvious symptom is missing metrics in Kibana, the traces are not impacted.
While the HOST and HOSTNAME environment variables allow to provide a fallback, adding them to very large deployments can become an extra burden.
However, reading the content of the /etc/hostname is still possible and we should then use it to provide a value to the host name. In this case we don't know if a simple host name or an FQDN is provided.
In containers the actual value is usually the container ID or a random string thus it's not for "human consumption" but is still relevant for correlation.
In short, this just adds an extra fallback option to existing heuristics.
May the instrumentation collect sensitive information, such as secrets or PII (ex. in headers)?
[x] n/a
[x] Create PR as draft
[x] Approval by at least one other agent
[x] Mark as Ready for Review (automatically requests reviews from all agents and PM via CODEOWNERS)
Remove PM from reviewers if impact on product is negligible
Remove agents from reviewers if the change is not relevant for them
[x] Approved by at least 2 agents + PM (if relevant)
[x] Merge after 7 days passed without objections \
To auto-merge the PR, add /schedule YYYY-MM-DD to the PR description.
When using very minimal container images like the distroless, the
hostname
command line tool that our agents use to capture the host name is missing and can't be used.When no value is captured for host name, the most obvious symptom is missing metrics in Kibana, the traces are not impacted.
While the
HOST
andHOSTNAME
environment variables allow to provide a fallback, adding them to very large deployments can become an extra burden.However, reading the content of the
/etc/hostname
is still possible and we should then use it to provide a value to the host name. In this case we don't know if a simple host name or an FQDN is provided.In containers the actual value is usually the container ID or a random string thus it's not for "human consumption" but is still relevant for correlation.
In short, this just adds an extra fallback option to existing heuristics.
CODEOWNERS
)/
schedule YYYY-MM-DD
to the PR description.If this spec adds a new dynamic config option, add it to central config.n/a