Enable graceful shutdown for start_{http,wsgi}_server by arsatiki · Pull Request #999 · prometheus/client_python
Hello @csmarchbanks, I made the start_http_server function a bit easier to cancel gracefully.
Signed-off-by: Antti Rasinen <antti.rasinen@relexsolutions.com>
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am happy with this and it seems helpful. I am going to leave it for a couple of days in case anyone else wants to test/chime in and then merge.
It's quite useful with long(ish) teardown situations and short scrape intervals. The metrics can get pretty skewed and meaningless since there's no new data coming in. Easier just to not respond at all instead of inventing new shuttingdown metrics or such.
There will be soon, hopefully in the next week or two, definitely this month. Hoping to batch a couple other changes into the release.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters