Skip to content

Commit 8348b60

Browse files
committed
Add usage example to PoolingHttpClientConnectionManagerMetricsBinder
See #533 (comment)
1 parent 1b5897d commit 8348b60

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

micrometer-core/src/main/java/io/micrometer/core/instrument/binder/httpcomponents/PoolingHttpClientConnectionManagerMetricsBinder.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@
3131
* {@link org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager} for
3232
* asynchronous HTTP clients.
3333
* <p>
34-
* It monitors the overall connection pool state.
34+
* It monitors the overall connection pool state. Usage example: <pre>{@code
35+
* PoolingHttpClientConnectionManager connectionManager = new PoolingHttpClientConnectionManager();
36+
* HttpClient httpClient = HttpClientBuilder.create().setConnectionManager(connectionManager).build();
37+
* new PoolingHttpClientConnectionManagerMetricsBinder(connectionManager, "my-pool").bindTo(registry);
38+
* }</pre>
3539
*
3640
* @author Benjamin Hubert ([email protected])
3741
* @since 1.3.0

0 commit comments

Comments
 (0)