Skip to content

[OpAMP] Publicly expose types for server to agent messagesΒ #3613

@stevejgordon

Description

@stevejgordon

It is currently not possible for a consumer to create an IOpAmpListener for any of the concrete nessage types. These are currently internal.

We should expose these types on the public API. A consideration is that doing so in the current design would also require the generated types from the .proto files to be public as those are directly exposed on properties of the messages. This is likely something we want to avoid.

Instead, we could consider making the message types wrappers for the underying generated types, exposing the properties as neccesary. Any properties should not directly expose generated types from the proto. We may therefore need to create some public types that expose the data on message properties in a more friendly form, for example, making AgentConfigMap a dictionary.

In a rough prototype I notice an issue with the namespace used for the generate types, currently, OpAmp.Proto.V1 which makes it difficult for the compiler to resolve. We may need to consider changing the generated namespace, to something like OpenTelemetry.OpAmp.Client.Internal.Proto,V1, including Internal in the name, for consistency.

@martincostello Do you want to assign to me. What I propose is that I create a draft PR for one message as an example so we can discuss the API design. I'm specifically blocked by at least the server-to-agent remote config message so I plan to start there. Does that sound reasonable?

Metadata

Metadata

Assignees

Labels

comp:opamp.clientThings related to OpenTelemetry.OpAmp.Client

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions