opentelemetry-collector icon indicating copy to clipboard operation
opentelemetry-collector copied to clipboard

Restore the "Shutdown complete" log from collector

Open andrzej-stencel opened this issue 3 years ago • 1 comments
trafficstars

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

The collector v0.52.0 and before used to write an INFO log on shutdown that said "Shutdown complete". This was useful e.g. in testing, to automatically verify that the collector has shut down completely.

2022-07-04T12:05:28.513+0200	info	service/collector.go:278	Shutdown complete.

In v0.53.0 and later, this log has been removed.

Now I don't seem to have a clear way of verifying that the collector has shut down.

Describe the solution you'd like

I propose to restore this single log. Hopefully this is a simple and painless change. 🤞

andrzej-stencel avatar Jul 04 '22 11:07 andrzej-stencel

Here's the simple pull request implementing the change: https://github.com/open-telemetry/opentelemetry-collector/pull/5626.

I was worried that access to logger is not possible at this stage with the refactoring made in service/collector.go, but it seems to run fine for now.

andrzej-stencel avatar Jul 04 '22 11:07 andrzej-stencel

Fixed in https://github.com/open-telemetry/opentelemetry-collector/pull/5913

bogdandrutu avatar Oct 10 '22 23:10 bogdandrutu

Fixed in #5913

Thanks a lot Bogdan for the update, it's good to know the "Shutdown complete" log is back.

andrzej-stencel avatar Oct 12 '22 07:10 andrzej-stencel