Open mike9421 opened 6 months ago
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself.
The reason for this behavior is that the effective.yaml
file is only intended to be written by the Supervisor. Can you explain more about your use case? The Supervisor specification allows for the possibility of using local Collector config along with remote config, would this work for you?
The reason for this behavior is that the
effective.yaml
file is only intended to be written by the Supervisor. Can you explain more about your use case? The Supervisor specification allows for the possibility of using local Collector config along with remote config, would this work for you?
Thanks for your reply. I know that the effective.yaml file is meant for the supervisor to write, and the supervisor retrieves remote configurations from the OpAMP server.
The phenomenon described in this issue is that when the remote configuration provided by the OpAMP server is empty (item.body is ""
), https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/5c765a3303696554000c7259a1683c92b41f052b/cmd/opampsupervisor/supervisor/supervisor.go#L716
the final configuration will become the default configuration provided by the supervisor.
Thecause of this issue is that the OpAMP server sends an empty configuration when the connection is first established. Has OTel considered implementing restrictions for this scenario?"(for example, using the saved configuration)
Thecause of this issue is that the OpAMP server sends an empty configuration when the connection is first established.
Why is the server doing this? I don't think this is compliant with the spec. Which server implementation is this?
Thecause of this issue is that the OpAMP server sends an empty configuration when the connection is first established.
Why is the server doing this? I don't think this is compliant with the spec. Which server implementation is this?
@tigrannajaryan I'm using the OpAMP-go server example.
When a connection is established for the first time, since the OpAMP server does not have the OTel's RemoteConfig, it will return an empty configuration (non-nil)
I think the server should send back the config after the agent sends the first message that contains the AgentDescription message. If that is not happening then I think it is a server bug.
I think the server should send back the config after the agent sends the first message that contains the AgentDescription message. If that is not happening then I think it is a server bug.
I also think it is a server error. I would like to ask if OTel needs to deal with this situation? After all, it is very important to ensure that the agent configuration is effective in remote configuration.
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers
. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself.
I think the server should send back the config after the agent sends the first message that contains the AgentDescription message. If that is not happening then I think it is a server bug.
I also think it is a server error. I would like to ask if OTel needs to deal with this situation? After all, it is very important to ensure that the agent configuration is effective in remote configuration.
If this happens, will OTel judge this better to ensure the stability of OTel?
I also think it is a server error. I would like to ask if OTel needs to deal with this situation? After all, it is very important to ensure that the agent configuration is effective in remote configuration.
I am not sure what exactly the Supervisor can do in this situation if the server misbehaves. I suggest to file a bug against the server (please include the repro steps).
Component(s)
cmd/opampsupervisor
What happened?
Description
When I run
opampsupervisor
(the backend program is OpAMP's sample server), I noticed thatEffectivConfig
gets cleared, leaving only the contents of ownMetricsCfg and ExtraLocalConfig.Steps to Reproduce
opampsupervisor
can connect to the backend normallyeffective.yaml
opampsupervisor
effective.yaml
.Expected Result
The content I filled in to the local configuration file named effective.yaml will not be cleared after the connection is established.
Actual Result
The configuration content I filled in was cleared
Collector version
all
Environment information
Environment
OS: Darwin Compiler: go 1.21
OpenTelemetry Collector configuration
Log output
No response
Additional context
I know the reason is that the backend server returns an empty remote configuration. However, I believe that the
opampsupervisor
needs to handle such situations to avoid the issue where configurations get overwritten due to logic errors in the backend.