![JAR search and dependency download from the Maven repository](/logo.png)
io.dropwizard.metrics5.httpclient5.HttpClientMetricNameStrategy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of metrics-httpclient5 Show documentation
Show all versions of metrics-httpclient5 Show documentation
An Apache HttpClient 5.x wrapper providing Metrics instrumentation of connection pools, request
durations and rates, and other useful information.
package io.dropwizard.metrics5.httpclient5;
import io.dropwizard.metrics5.MetricName;
import io.dropwizard.metrics5.MetricRegistry;
import org.apache.hc.client5.http.classic.HttpClient;
import org.apache.hc.core5.http.HttpRequest;
@FunctionalInterface
public interface HttpClientMetricNameStrategy {
MetricName getNameFor(String name, HttpRequest request);
default MetricName getNameFor(String name, Exception exception) {
return MetricRegistry.name(HttpClient.class,
name,
exception.getClass().getSimpleName());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy