All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.codahale.metrics.httpclient.HttpClientMetricNameStrategy Maven / Gradle / Ivy

Go to download

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