View HttpClient metrics from a PoolingHttpClientConnectionManager
- MaxTotal
- DefaultMaxPerRoute
- Leased
- Pending
- Available
- Max
- RoutesTotal
Available to view via JMX compatible monitoring and profiling tools such as AppDynamics, DataDog and VisualVM
<dependency>
<groupId>com.testingsyndicate</groupId>
<artifactId>hc-jmx</artifactId>
<version>...</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5</version>
</dependency>
// Create a PoolingHttpClientConnectionManager
PoolingHttpClientConnectionManager connectionManager = new PoolingHttpClientConnectionManager();
// Register it with the name "default"
HcJmx.register(connectionManager);
Metrics shown in VisualVM
MIT