open-telemetry / opentelemetry-collector-contrib

Contrib repository for the OpenTelemetry Collector
https://opentelemetry.io
Apache License 2.0
2.72k stars 2.15k forks source link

[cmd/opampsupervisor] Make persistent state configurable #33101

Open evan-bradley opened 1 month ago

evan-bradley commented 1 month ago

Component(s)

cmd/opampsupervisor

Is your feature request related to a problem? Please describe.

The Supervisor's persistent state feature is currently required, we should make it optional; things like the instance ID or prior configuration aren't critical for running the Supervisor.

Describe the solution you'd like

Add a configuration option to disable persistent state, and if we can't access the persistent state, log an error and disable the persistent state functionality instead of exiting.

cc @BinaryFissionGames

Describe alternatives you've considered

No response

Additional context

No response

BinaryFissionGames commented 1 month ago

Is there a reason why someone would want to disable persistent state? I'm curious if there's particular use-case.

The main thing I can think of is if we need to run somewhere with a read-only file system, but we need somewhere to write the effective config to disk either way. So I figured making it a requirement made sense. But is there some other reason someone would like to disable it?