Make graceful shutdown optional#3577
Make graceful shutdown optional#3577tigrannajaryan merged 2 commits intoopen-telemetry:mainfrom rakyll:signals
Conversation
|
One cool fact about this PR is that it's partly written by GitHub Copilot. |
tigrannajaryan
left a comment
There was a problem hiding this comment.
This removes a functionality that was previously available to other distros. Other distros that needs this will have to reimplement it.
Instead of removing it can we make it optional or decouple it in some other way from service.Collector so that distros that don't need it are not forced to use it and distros that do need it can still continue using it?
|
Can we file some issues on the distros and make sure they are switching to the new model? |
We can, but what's the new model? Do we suggest that they copy runInteractive, runService and shutdownGracefully functions? It would be nicer if we offered the functionality in some more easily usable way to other distros (and to our own contrib, which is another distro in this context :-) ). |
|
@tigrannajaryan A distro already needs to write the main program from scratch including the windows bits. Nonetheless, I'll introduce an option to the collector settings, so this is not a breaking change. |
service.Collector is handling the signal management and implementing a graceful shutdown. This is a problem for collectors that want to wire their own signal handling in cases they want to add custom logic and/or have resources other than the service.Collector to shutdown. Making the automatic shutdown an optional behavior for users who may need to disable it. Fixes #3490
|
PTAL |
service.Collector is handling the signal management and implementing a graceful shutdown. This is a problem for collectors that want to wire their own signal handling in cases they want to add custom logic and/or have resources other than the service.Collector to shutdown. Moving the graceful shutdown out of the service package to let the main programs do the wiring themselves.
Fixes #3490