use of com.netflix.discovery.util.ExceptionsMetric in project eureka by Netflix.
the class MetricsCollectingEurekaHttpClient method createFactory.
public static TransportClientFactory createFactory(final TransportClientFactory delegateFactory) {
final Map<RequestType, EurekaHttpClientRequestMetrics> metricsByRequestType = initializeMetrics();
final ExceptionsMetric exceptionMetrics = new ExceptionsMetric(EurekaClientNames.METRIC_TRANSPORT_PREFIX + "exceptions");
return new TransportClientFactory() {
@Override
public EurekaHttpClient newClient(EurekaEndpoint endpoint) {
return new MetricsCollectingEurekaHttpClient(delegateFactory.newClient(endpoint), metricsByRequestType, exceptionMetrics, false);
}
@Override
public void shutdown() {
shutdownMetrics(metricsByRequestType);
exceptionMetrics.shutdown();
}
};
}
use of com.netflix.discovery.util.ExceptionsMetric in project eureka by Netflix.
the class MetricsCollectingEurekaHttpClient method createFactory.
public static EurekaHttpClientFactory createFactory(final EurekaHttpClientFactory delegateFactory) {
final Map<RequestType, EurekaHttpClientRequestMetrics> metricsByRequestType = initializeMetrics();
final ExceptionsMetric exceptionMetrics = new ExceptionsMetric(EurekaClientNames.METRIC_TRANSPORT_PREFIX + "exceptions");
return new EurekaHttpClientFactory() {
@Override
public EurekaHttpClient newClient() {
return new MetricsCollectingEurekaHttpClient(delegateFactory.newClient(), metricsByRequestType, exceptionMetrics, false);
}
@Override
public void shutdown() {
shutdownMetrics(metricsByRequestType);
exceptionMetrics.shutdown();
}
};
}
Aggregations