-
Notifications
You must be signed in to change notification settings - Fork 172
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
RFC: Evolve host.id into a default, always present attribute (rethinking machine-id) #581
Comments
cc @svrnm @sumo-drosiek @mwear (since you have worked on either spec or implementation of |
I remember reading the If I understand the UUIDv5 definition it is equivalent to a "keyed hash", so it appears to be a logical solution to do something similar to #312. The question is what the "namespace" is (assuming the name is the machine-id), I guess this is best a fixed value, since the goal here is to have a "unique identifier that is tied to the machine".
This is a topic that drove me crazy. So, to get started: My perspective is that In the case of a container, the container.id is what you want to set. But there is no reliable way to obtain it from within the container, see containerd/containerd#8185 |
We discussed this on the System Semantic Conventions WG, let me try to summarize what I said (plus some last-minute thoughts). My main points were:
|
Based on your summary, the subject of this issue (Evolve host.id into a default, always present attribute) seems not to be something that can be accomplished (at least from within the OpenTelemetry community alone)? A few extra comments:
💯 -- this is really a BIG concern, coming up again and again. In a large environment when something goes wrong but only one (or a subset) of instances within a service are affected, it's crucial to know which one(s). As you outlined above, this is already not trivial for a lasting instance (bare metal, VMs, ...) and get's even more complicated with ephemeral instances (containers, ...). That's also why I raised containerd/containerd#8185, which has a history of similar issues attached to it (see opencontainers/runtime-spec#1105). @mx-psi if there is any value to it I can give a rundown of this to the System Semantic Conventions WG eventually.
To call this out, even if the issue above with containers gets solved somehow, it will very likely stay optional, as it's in the nature of a being in a container to not know about being in a container (by default). |
Given that we have no guidelines for containerized environments, does it make sense to add a containerized section (or generify the non-containerized one) and specify that the
Does it make sense to further specify that in cases where |
Under the assumption that a container is identified by I think the implicit definition (so far), was that |
Resurrecting this thread:
These are different attributes with different lifetimes and different semantics. The value of
Going by the proposed updates in #576, in priority order:
To give you an example, our universal profiling product comes with deployment instructions that map To recap:
|
Yes, it is valuable, if and only if host.id is the id of the container host.
Very often |
I think there is value, but the discussion feels a bit theoretical to me. Other than the user passing it explicitly via an environment variable of some other sort of convention, I can't think of a way to reliably retrieve this value on a container and not fall prey to issues like open-telemetry/opentelemetry-collector-contrib#18618 (comment) |
I unfortunately hadn't have the time to follow up on this, but I still think that our best option is working with container projects to get an at least optional but standardized way of making a container + container host identifiable from within the container, see containerd/containerd#8185 |
Similarly to #311, I'd like to first describe some issues with the existing host.id semantics around
machine-id
usage and propose some alternatives.According to machine-id(5):
This goes against OpenTelemetry guidelines which dictate using the value of
/etc/machine-id
(or/var/lib/dbus/machine-id
) verbatim. Besides following the recommendation in the manpage (keyed hash), another alternative is to use UUIDv5 (SHA1), similarly to #312.A secondary issue is that OpenTelemetry guidelines do not specify a fallback for
host.id
in cases where themachine-id
is missing. For example, this is quite common in containerized environments if the Docker volume mount does not exist. In such cases, UUIDv4 can be used to generate a value that may be cached by the client application and reused (for as long as it makes sense given a context that's specific to the application).The text was updated successfully, but these errors were encountered: