open-telemetry / opentelemetry-specification

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

[entities] Do we always require identifying attributes to be globally unique? #4254

Open dmitryax opened 1 month ago

dmitryax commented 1 month ago

Similar to https://github.com/open-telemetry/opentelemetry-specification/issues/4253, this question is the result of prototyping of entity detection in the collector https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/35538.

It was observed that some detectors can provide global IDs while others can only provide local IDs within a particular context. For example, the k8s node detector can only provide a unique k8s.node.uid within a particular cluster.

Do we need to require identifying attributes to be always globally unique? Can we instead use a composition of entities attached to a particular resource, where each entity is only global within the context of another "parent" entity (e.g., k8s node -> k8s cluster)? That way, it'll be much easier to combine detectors responsible for different entity types.

dmitryax commented 1 month ago

This was discussed during the Entities SIG meeting on Oct 10. The tentative agreement is that entities will only have local IDs. Global identification will be achieved by combining different parent-child entities. This is the direction we are going to continue prototyping