Enable graceful shutdown for start_{http,wsgi}_server#999
Enable graceful shutdown for start_{http,wsgi}_server#999csmarchbanks merged 1 commit intoprometheus:masterfrom
Conversation
Signed-off-by: Antti Rasinen <antti.rasinen@relexsolutions.com>
csmarchbanks
left a comment
There was a problem hiding this comment.
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 |
|
Is there going to be a pypi release for this? @csmarchbanks |
|
There will be soon, hopefully in the next week or two, definitely this month. Hoping to batch a couple other changes into the release. |
|
@jwiesler I just released https://github.com/prometheus/client_python/releases/tag/v0.20.0 with this feature included! |
Hello @csmarchbanks, I made the
start_http_serverfunction a bit easier to cancel gracefully.