Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Entities] How to model host and cloud VM entities #4372

Open
dmitryax opened this issue Jan 16, 2025 · 0 comments
Open

[Entities] How to model host and cloud VM entities #4372

dmitryax opened this issue Jan 16, 2025 · 0 comments
Labels
entities sig-issue A specific SIG should look into this before discussing at the spec spec:resource Related to the specification/resource directory

Comments

@dmitryax
Copy link
Member

This issue stems from open-telemetry/semantic-conventions#1752. Resolving it will also help with stabilizing the host.id attribute and fixing the following problems:

The are three options on how we can define entities for hosts and cloud VMs:

1. Consider it the same entity

The entity will be called host, but it can have additional attributes associated with a corresponding cloud VM. We keep one identifying attribute host.id with a value taken either from the cloud provider (if applicable) or from the host machine-id.

Pros:

a. No changes to the source of host.id attribute value required

b. Keeping the entities map simple. No need for an extra relationship between the host and the cloud VM

Cons:

a. host.id stays overloaded. The value source is different depending on whether the producer has access to the cloud or not.

b. In case of 2 separate detectors (one for host, another for cloud), it would require a special merging logic that would mutate the identifying host.id attribute based on the pre-defined priority.

2. Consider them separate entities

Pros:

a. Clean separation between identifying attributes: host.id for host and cloud.vm.id (TBD) for cloud VM.

b. Easy merging logic.

Cons:

a. It requires moving the cloud VM id value from host.id to a separate attribute and keeping the host.id based on the machine-id value. This is a huge breaking change for the systems that have adopted the existing ambiguous definition of host.id attribute

b. Additional complexity to represent two separate entities. Also, it requires an additional relationship type (inherits?)

2. Consider them conflicting entities

It means that these entities cannot be present on the same resource. It has to be only one of them. The other entity can potentially be sent in a separate side channel. It'll require some special merging rule, but it'll be simpler than the merging required for Option (2).

Pros:

a. The host.id attribute overloading is not a blocking problem anymore. The cloud VM entity can keep using host.id or have a separate attribute.

b. Easier merging logic than the one required for Option (1): replacement of the whole entity instead of an attribute value.

Cons:

a. Some merging logic would still be required if separate detectors are applied.

b. Simlilar to option (2), it introduces an additional complexity to represent two separate entities.

@dmitryax dmitryax added the spec:resource Related to the specification/resource directory label Jan 16, 2025
@svrnm svrnm added sig-issue A specific SIG should look into this before discussing at the spec entities labels Jan 20, 2025
@svrnm svrnm added this to Entities Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
entities sig-issue A specific SIG should look into this before discussing at the spec spec:resource Related to the specification/resource directory
Projects
Status: No status
Development

No branches or pull requests

2 participants