opamp-go icon indicating copy to clipboard operation
opamp-go copied to clipboard

Capability to set RequestInstanceUid flag in AgentToServer msg as per the spec

Open Sairam-Arpavur-Natarajan opened this issue 2 years ago • 2 comments

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.

srikanthccv avatar Sep 11 '23 21:09 srikanthccv

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.