opamp-go
opamp-go copied to clipboard
Capability to set RequestInstanceUid flag in AgentToServer msg as per the spec
I am trying to implement our use case of the Agent requesting the Server for the identifier. The specification supports it, but its yet implemented in the opamp-go. https://github.com/open-telemetry/opamp-spec/blob/main/specification.md#agenttoserverinstance_uid. I can contribute to the go implementation. Any pointers for the changes will be helpful.
We need to add SetFlags on the OpAMPClient interface. And ClientCommon implementation to schedule to send it in the next message. https://github.com/open-telemetry/opamp-go/blob/9efb265ce3818016ed36ecfa0fc3ce86c5c1cf96/client/client.go#L11-L83
Just to note, If your server implementation sends a non-nil AgentIdentification field, the new instance ID is always honoured and will be set for subsequent messages.
I can verify that behavior. But would like to follow the protocol and have the capability in Agent to specifically request new instance ID from the Server.