-
Notifications
You must be signed in to change notification settings - Fork 20
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
Feature Request: Be able to introspect pool state/telemetry #37
Comments
Hi @aselder! The information on checkout/available can be done on top of NimblePool. Especially because we keep resources as a queue, so we would need to keep a counter ourselves, so I would rather leave this decision to users. Wait time can also be computed on client by measuring the time before calling checkout and effectively checking out. The only measurement that would need to be provided is the idle timeout, which we could improve NimblePool to send it downstream. Perhaps by allowing a three arity function on checkout, the third element being metadata (this one could also be emulated but it is quite more annoying to do so and it is information we already track). |
I'm currently working to implement something like this on Finch sneako/finch#183. I think the only feature we will need to implement on the nimble pool side is a new callback for pool termination. Because we need to clear all the metrics state when the pool is terminated. If this makes sense to you I can implement it here. What you think @josevalim? |
I will gladly accept terminate_pool callback :) |
Closing this for now. If there is an interest on idle_timeout, please open up an issue, but now that I think about it, even it could be calculated. :) |
It would be nice to be able to get some telemetry from NimblePool.
In particular, it would be nice to be able to track pool utilization (# checkout/ #available) and time spent waiting for a resource.
The text was updated successfully, but these errors were encountered: