
com.codahale.metrics.httpclient.HttpClientMetricNameStrategy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of metrics-httpclient Show documentation
Show all versions of metrics-httpclient Show documentation
An Apache HttpClient wrapper providing Metrics instrumentation of connection pools, request
durations and rates, and other useful information.
The newest version!
package com.codahale.metrics.httpclient;
import com.codahale.metrics.MetricRegistry;
import org.apache.http.HttpRequest;
import org.apache.http.client.HttpClient;
@FunctionalInterface
public interface HttpClientMetricNameStrategy {
String getNameFor(String name, HttpRequest request);
default String getNameFor(String name, Exception exception) {
return MetricRegistry.name(HttpClient.class,
name,
exception.getClass().getSimpleName());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy