async-http-client icon indicating copy to clipboard operation
async-http-client copied to clipboard

AsyncHTTPClient should export metrics

Open fabianfett opened this issue 4 years ago • 1 comments

Developers want to monitor metrics of outgoing http requests to identify potential causes of issues with dashboards.

While it is possible to generate some metrics by implementing a custom HTTPClientResponseDelegate today, this is quite a burden. Further there are some metrics AsyncHTTPClient users don't have access to. For example:

  • Number of active http/1.1 requests to a host
  • Number of requests in the queue to a host

The metrics should be exported to SwiftMetrics directly or with a delegate protocol call comparable to URLSession:task:didFinishCollectingMetrics: exporting NSURLSessionTaskMetrics. If the latter approach is chosen, there should also be a callback/delegate to observe the connection pool size and requests queued per ConnectionPool.Key.

fabianfett avatar Feb 23 '21 13:02 fabianfett

  • how many Waiters do we have
  • how many connections do we have open
  • how many connections are parked in the pool

weissi avatar Feb 25 '21 15:02 weissi