rursprung opened a new pull request, #908:
URL: https://github.com/apache/httpcomponents-client/pull/908

   `HttpClientObservationSupport.enable(...)` with `MetricSet.CONN_POOL` only 
bound the pool gauges. The `<prefix>.pool.lease` timer and the 
`<prefix>.pool.leases` counter were recorded only if the caller wrapped the 
connection manager explicitly with `meteredConnectionManager()` or 
`meteredAsyncConnectionManager()`. This is not possible when a library creates 
the connection manager internally and only exposes the builder, for example 
[`ApacheHttpClient5TransportBuilder` in 
`opensearch-java`](https://github.com/opensearch-project/opensearch-java/blob/main/java-client/src/main/java/org/opensearch/client/transport/httpclient5/ApacheHttpClient5TransportBuilder.java).
   
   All `enable(...)` variants (classic, async and caching) now replace the 
connection manager of the builder with the metered wrapper and bind the pool 
gauges to it:
   
   - A manager that is already a `MeteredConnectionManager` or a 
`MeteredAsyncConnectionManager` is not wrapped again, so explicit wrapping and 
repeated `enable(...)` calls stay safe.
   - The connection manager shared flag is not changed.
   - Pool gauges are bound only if the original manager is a `ConnPoolControl`, 
as before.
   - If no connection manager is set on the builder, no pool metrics are 
installed, as before. The default manager that `build()` creates is not 
instrumented.
   - If `CONN_POOL` is disabled, nothing changes.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to