micronaut-micrometer
micronaut-micrometer copied to clipboard
Feature Request: Http Client Channel Pool Metrics
It would be nice to have visibility into what is happening in the channel pools of http clients. For example the number of channels checked out, pending acquires, rate/number of new connections created, timings on how long it took to open a new connection, etc.
Yes, this functionality is very much needed. We are seeing performance issues related to connection pooling
@graemerocher I realize this issue is quite old, do you know if an implementation of this would be relatively straightforward for someone to contribute it? I'd be happy to try and take this on but I'm a bit worried the HTTP connection pooling code is too complex for someone outside the Micronaut core team.
Our main use case is we would like to understand better if we are maxing out our HTTP connection pools or not but as far as I know there's no way to know that currently.
@yawkat would know more
Depends on the metrics. imo ConnectionManager is fairly clean nowadays, and I think the "state" metrics (e.g. number of open connections) should be fairly easy with access to PoolResizer. Timing metrics may be more difficult because the code is very asynchronous
@yawkat thank you. Do you think updating the state of the metrics within the PoolResizer#doSomeWork
method would be a reasonable approach? I think just these metrics would be enough for me:
pendingRequestCount
pendingConnectionCount
http1ConnectionCount
http2ConnectionCount
sure