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

Generate a service.instance.id if it is not present? #1908

Open
srikanthccv opened this issue Jan 9, 2023 · 2 comments
Open

Generate a service.instance.id if it is not present? #1908

srikanthccv opened this issue Jan 9, 2023 · 2 comments
Labels
do-not-stale issue:blocked Fix blocked, waiting for other fixes as prerequisites

Comments

@srikanthccv
Copy link
Member

Spec says https://github.com/open-telemetry/opentelemetry-specification/tree/v1.6.1/specification/resource/semantic_conventions#service

MUST be unique for each instance of the same service.namespace,service.name pair (in other words service.namespace,service.name,service.instance.id triplet MUST be globally unique). The ID helps to distinguish instances of the same service that exist at the same time (e.g. instances of a horizontally scaled service). It is preferable for the ID to be persistent and stay the same for the lifetime of the service instance, however it is acceptable that the ID is ephemeral and changes during important lifetime events for the service (e.g. service restarts). 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 built-in default Resource doesn't appear to do this. While it is not mandatory by specification, it is important when scaling a service horizontally.

https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/data-model.md#single-writer

https://github.com/open-telemetry/opentelemetry-specification/blob/7e9ba1683995c34846b942fbc23c3290610e9347/specification/compatibility/prometheus_and_openmetrics.md#resource-attributes

@svrnm
Copy link
Member

svrnm commented Jan 24, 2023

@lalitb lalitb added the issue:blocked Fix blocked, waiting for other fixes as prerequisites label Mar 8, 2023
@github-actions
Copy link

github-actions bot commented May 8, 2023

This issue was marked as stale due to lack of activity.

@github-actions github-actions bot added the Stale label May 8, 2023
@lalitb lalitb added do-not-stale and removed Stale labels May 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-stale issue:blocked Fix blocked, waiting for other fixes as prerequisites
Projects
None yet
Development

No branches or pull requests

3 participants