Skip to content

[cmd/opampsupervisor] Remote Configuration model in the supervisor #40094

Open
@canthar

Description

@canthar

Component(s)

cmd/opampsupervisor

Describe the issue you're reporting

Hi!
I'm writing here to start a discussion about how opampsupervisor implements RemoteConfig OpAMP feature.

Just from OpAMP point of view, remote configuration is a map with filenames as keys. It makes sense, as it makes it possible to reflect this configuration on the filesystem. When using with OTel Collectors, it'd be possible to include other files (so to use exporters: ${file:exporters.yaml} syntax).

However, I see it was decided that opampsupervisor implements quite a different model. It takes all the configuration files from the RemoteConfig, sorts them by filename and merges all the files into a final one (with the possibility to also modify the final configuration locally).

This supervisor's model works fine as it makes it possible to configure the collector. However, my concern is that this behavior changes the meaning of the OpAMP message, as now the final configuration depends on how the files are sorted. In other words, it's not behaving like a map as defined by the protocol, but a list.

This change is important for any OpAMP server implementation, so that they could present the remote configuration to the user in the same way as it’s interpreted.

That’s why I have a question, what is the reason why this change of meaning was implemented here, especially that opampsupervisor is in fact the reference implementation of the supervisor model in OpAMP. Do you think, that this model should be the standard one for configuring OTel Collectors?
As OpenTelemetry is the main driver of OpAMP, maybe this behavior should be mentioned or somehow explicitly stated in the protocol?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions