From cd83851e2bfdcae2327b7d4a4e8909dea5c705dd Mon Sep 17 00:00:00 2001 From: Tommy Ludwig <8924140+shakuzen@users.noreply.github.com> Date: Wed, 6 Jul 2022 19:34:10 +0900 Subject: [PATCH] Add usage example to PoolingHttpClientConnectionManagerMetricsBinder See https://github.com/micrometer-metrics/micrometer/issues/533#issuecomment-801770400 --- .../PoolingHttpClientConnectionManagerMetricsBinder.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/httpcomponents/PoolingHttpClientConnectionManagerMetricsBinder.java b/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/httpcomponents/PoolingHttpClientConnectionManagerMetricsBinder.java index e84aa9fae1..be72bbd5e7 100644 --- a/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/httpcomponents/PoolingHttpClientConnectionManagerMetricsBinder.java +++ b/micrometer-core/src/main/java/io/micrometer/core/instrument/binder/httpcomponents/PoolingHttpClientConnectionManagerMetricsBinder.java @@ -31,7 +31,11 @@ * {@link org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager} for * asynchronous HTTP clients. *
- * It monitors the overall connection pool state. + * It monitors the overall connection pool state. Usage example:
{@code + * PoolingHttpClientConnectionManager connectionManager = new PoolingHttpClientConnectionManager(); + * HttpClient httpClient = HttpClientBuilder.create().setConnectionManager(connectionManager).build(); + * new PoolingHttpClientConnectionManagerMetricsBinder(connectionManager, "my-pool").bindTo(registry); + * }* * @author Benjamin Hubert (benjamin.hubert@willhaben.at) * @since 1.3.0