From 218536c857ac7312d06fe66025c417e521650f52 Mon Sep 17 00:00:00 2001 From: Tigran Najaryan Date: Thu, 28 Jul 2022 14:11:22 -0400 Subject: [PATCH] Require that instance_uid is ULID instead of only recommending it Resolves https://github.com/open-telemetry/opamp-spec/issues/113 This PR changes ULID to be a `MUST` in order to: - Avoid mistakes when the Agent chooses too short instance id and causes collisions. - Make the Server's life a bit easier since will know it is always a 128 bits of data and can store in places where UUIDs can be stored (e.g. Postgres has a data type UUID). --- specification.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/specification.md b/specification.md index 9524fa1..7e38bfa 100644 --- a/specification.md +++ b/specification.md @@ -390,8 +390,9 @@ The instance_uid field is a globally unique identifier of the running instance of the Agent. The Agent SHOULD self-generate this identifier and make the best effort to avoid creating an identifier that may conflict with identifiers created by other Agents. The instance_uid SHOULD remain unchanged for the -lifetime of the Agent process. The recommended format for the instance_uid is -[ULID](https://github.com/ulid/spec). +lifetime of the Agent process. The instance_uid MUST be a +[ULID](https://github.com/ulid/spec) formatted as a 26 character string in canonical +representation. In case the Agent wants to use an identifier generated by the Server, the field SHOULD be set with a temporary value and RequestInstanceUid flag MUST be set. @@ -658,7 +659,9 @@ enum ServerCapabilities { Properties related to identification of the Agent, which can be overriden by the Server if needed. When new_instance_uid is set, Agent MUST update instance_uid -to the value provided and use it for all further communication. +to the value provided and use it for all further communication. The new_instance_uid MUST +be a [ULID](https://github.com/ulid/spec) formatted as a 26 character string in canonical +representation. ```protobuf message AgentIdentification {