Skip to content

Instantly share code, notes, and snippets.

View ravin-singh's full-sized avatar

Ravindra Khyalia ravin-singh

View GitHub Profile
@ravin-singh
ravin-singh / gist:8654b654163c508cdb227a621fe078f0
Last active October 25, 2021 07:34
Micrometer metrics exporter for apache http connection pool
1. Create a scheduler to add new routes
@Scheduled(fixedRate = 300000)
public void updateHttpRoutes() {
Set<HttpRoute> routes = poolingHttpClientConnectionManager.getRoutes();
for (HttpRoute route : routes) {
httpMetricsTracker.add(route, poolingHttpClientConnectionManager);
}
}