Introduce host.id attribute to traces
- Dominant language
- Go
- Stars
- 1.3k
- Forks
- 543
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 109
Description
Metrics and logs identified a problem of using _host.name_ for correlation when ingesting data from cloud environments, as they don't provide proper host name.
Proposed solution is to introduce host.id field which is "calculated" and is equal host.name for on-premises environments, and for cloud it is equal cloud.instance.id.
Original [issue](https://github.com/elastic/apm-server/issues/2608) and [spreadsheet](https://docs.google.com/spreadsheets/d/1-XyJCeTSfHutR5Py1wdNzvwfFz4bj8VcCGsKYlzkOpY/edit#gid=622922754) with the breakdown.
This seems to align well with [OTel spec](https://github.com/open-telemetry/opentelemetry-specification/blob/7e0c10260178b947777cf9c11d7f7ac4d4700725/specification/resource/semantic_conventions/host.md), as they are using cloud instance_id as the host.id.
The proposal for APM is to calculate _host.id_ dynamically based on whether cloud metadata is present or using host.name otherwise.
We would leverage this when integrating products together, i.e. linking from Infra to APM and vice versa.
We would also need to recognize host.id when ingesting data from OTel.
CC: @graphaelli @felixbarny
Contributor guide
Assessment
This issue has not been assessed yet.