-
Notifications
You must be signed in to change notification settings - Fork 775
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[httpserver exporter] No option to specify a wait time for ongoing requests when closing the server #938
Comments
Thanks @nicu-da, I'm happy to make it configurable. Do you think |
Thank you for the quick response @fstab. Checking the docs for close:
it sounds like using a non 0 value as a default would be saner, giving 1 second for any scrape to finish before shutting down the server. It shouldn't have an impact in most cases as even if there is a scrape ongoing, in most cases it should finish a lot quicker. |
+1 to this request probably giving 1 sec is a saner default but let others make it 0 if they need it. Also, we would like to have a way to pass a custom metric handler In the old version (0.16) we could use a fake name filter to detect when it was scraped and then close the server (adding some extra delay) with the newer versions there is no way to do that so it will be nice if you could make the handler configurable (or implement an option that when close is called it waits for a last scrape until it does the server). |
The wait time when shutting down the HTTP server exporter is hard-coded to 0. This in turn leads to errors being logged during shutdown if there is a request in progress to scrape the metrics while close is called.
Ideally the wait should be configurable.
EDIT: formatted stacktrace @dhoard
The text was updated successfully, but these errors were encountered: