-
Notifications
You must be signed in to change notification settings - Fork 926
Description
The resource semantic conventions say the following about service.instance.id
:
If the service has no inherent unique ID that can be used as the value of this attribute it is recommended to generate a random Version 1 or Version 4 RFC 4122 UUID (services aiming for reproducible UUIDs may also use Version 5, see RFC 4122 for more recommendations).
The language is ambiguous as it's not clear "what" / "who" is supposed to generate the random Version 1 or Version 4 UUID. Is it the application owner? Is it the language SDK?
There's a request in opentelemetry-java
that we generate service.instance.id. We discussed adding it in the Java SIG and there was debate about whether this was actually the intent of the spec, and if it is, whether its a good idea. The argument against including it can probably be summarized as:
- Adding a random service.instance.id that is not persistent across restarts increases cardinality. While this is true I disagree that it is a problem, since I think the number of users negatively impacted would be small and they have options available to solve the problem.
- Adding a random service.instance.id that doesn't reflect the identifier of the instance in its environment (i.e. is different than the pod uid) may be confusing to users. I disagree that this is a problem because users should set
service.instance.id
to an inherent unique ID if available.
Maybe I'm missing part of the debate but in any case it would be good if the spec could clear up this ambiguity.
This may be a duplicate of #1034, but that issue's description appears to be asking about alternates for service.instance.id where I'm asking about what is specifically responsible for generating service.instance.id in the current wording of the spec.