opentelemetry-collector
opentelemetry-collector copied to clipboard
collector state won't be set to Running state after watch is triggered
Describe the bug
After configuration is updated and watch is triggered, the collector health state will be stuck at Starting even tho the collector has started completely.
Steps to reproduce
- Run the collector
- trigger
watchoperation in config provider - check collector state by calling
GetState - state won't be in
Runningand will always be inStarting
What did you expect to see?
collector state to be Running
What did you see instead?
Collector state is always Starting
What version did you use? latest. https://github.com/open-telemetry/opentelemetry-collector/blob/main/service/collector.go#L140
What config did you use? any config
Environment OS: mac catalina
The bug is relatively easy to fix, we just need to set the collector state to running after https://github.com/open-telemetry/opentelemetry-collector/blob/main/service/collector.go#L154 or move col.setCollectorState(Running) to the end of setupConfigurationComponents call
Thanks for the report. Please submit a PR with the fix.
@dmitryax I can take that over.