semantic-conventions icon indicating copy to clipboard operation
semantic-conventions copied to clipboard

Add fallback for host.id in Cloud

Open christos68k opened this issue 1 year ago • 11 comments
trafficstars

This PR changes the semantics behind host.id calculation for Cloud.

Changes

In Cloud, it is possible for instance_id to not be retrievable from inside the instance (e.g. security concerns / restricted instance metadata). In this case, the host.id can be set from machine-id (same steps as non-containerized systems).

Without a fallback, the must wording has strong implications for clients and users in cases where the instance_id can not be automatically retrieved:

  1. Do not automatically populate host.id
  2. Urge the user to either provide instance_id or change the configuration to make it retrievable

A (breaking) alternative to the current approach is to always populate host.id from machine-id, and use a different field for instance_id (e.g. service.instance.id)

Merge requirement checklist

christos68k avatar Dec 01 '23 18:12 christos68k

@christos68k please do the change in the corresponding yaml file: https://github.com/open-telemetry/semantic-conventions/blob/ed7d3e0f939cbdcd6c0b6093d157d3f5e8bbc9bd/model/registry/host.yaml#L8

The tables in markdown files are generated from the model yaml files. So once you did the change in the yaml file you need to run: make table-generation. This will automatically update the tables in the markdown files.

AlexanderWert avatar Dec 02 '23 14:12 AlexanderWert

@open-telemetry/semconv-system-approvers @open-telemetry/semconv-container-approvers PTAL

AlexanderWert avatar Dec 02 '23 14:12 AlexanderWert

This PR was marked stale due to lack of activity. It will be closed in 7 days.

github-actions[bot] avatar Jan 25 '24 03:01 github-actions[bot]

Adding a comment to keep this PR from being closed.

christos68k avatar Jan 29 '24 16:01 christos68k

This PR was marked stale due to lack of activity. It will be closed in 7 days.

github-actions[bot] avatar Feb 29 '24 03:02 github-actions[bot]

Closed as inactive. Feel free to reopen if this PR is still being worked on.

github-actions[bot] avatar Mar 08 '24 03:03 github-actions[bot]

Could someone with rights (@mx-psi @AlexanderWert maybe?) to do so reopen this pull request?

christos68k avatar Mar 26 '24 19:03 christos68k

@christos68k I have reopened this one. You will need to update the changelog entry to follow the new format: https://github.com/open-telemetry/semantic-conventions/blob/main/CONTRIBUTING.md#adding-a-changelog-entry

ChrsMark avatar Mar 27 '24 10:03 ChrsMark

This PR was marked stale due to lack of activity. It will be closed in 7 days.

github-actions[bot] avatar Apr 19 '24 03:04 github-actions[bot]

This PR was marked stale due to lack of activity. It will be closed in 7 days.

github-actions[bot] avatar May 08 '24 03:05 github-actions[bot]

Given activity happening in Entity SIG - I think it's best to "wait" on major changes to resource related attributes. My own opinion on this Pr is that:

  1. Yes, using machine id makes sense as the default for host.id
  2. Having cloud-specific ids land in host.id seems problematic from a consistency/implementation standpoint. We need to define mechanisms where we would understand how a cloud-provider Resource detector would interact with a Host-specific resource detector. This change would force the ability for us to understand merge conflcts and overrides between these two disjoint components.

As such - (while I think machine id should be the default for host.id) I think we need to hold off on this PR until more progress has been made in Entity SiG - particularly the mapping between Resource <-> Entity and conflict resolution.

jsuereth avatar May 16 '24 15:05 jsuereth

This PR was marked stale due to lack of activity. It will be closed in 7 days.

github-actions[bot] avatar Jun 01 '24 03:06 github-actions[bot]

Closed as inactive. Feel free to reopen if this PR is still being worked on.

github-actions[bot] avatar Jun 09 '24 03:06 github-actions[bot]