open-telemetry / opentelemetry-specification

Specifications for OpenTelemetry
https://opentelemetry.io
Apache License 2.0
3.76k stars 890 forks source link

[entities] Do we allow different identifying attributes? #4253

Open dmitryax opened 1 month ago

dmitryax commented 1 month ago

After prototyping entity detection in the collector https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/35538, we found that some detectors currently cannot provide the same set of identifying attributes for the same type. For example, most of the detectors detecting a host entity type can provide host.id while the docker detector currently can only provide host.name.

This particular issue with the docker detector can potentially be mitigated by:

  1. Updating the docker detector to provide host.id. To be investigated.
  2. If 1 isn't possible, the entity type can potentially be called differently.

Even if we have a solution for this particular case, it's possible to run into other cases like this with other entity types. We can keep tracking them in this issue.

Based on the observations, we need to decide if we strictly define a set of identifying attributes for a particular entity type or keep it open while providing a list of recommended attributes.