elastic / elastic/apm-server

Introduce host.id attribute to traces

Open
#4,368 11 comments 0 reactions 0 assignees View on GitHub
blocked enhancement
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.