Browse Source

Remove unused `registry` private field. (#1746)

fixes gh-1745
pull/6/head
Bertrand Renuart 8 years ago committed by Spencer Gibb
parent
commit
fae60e9fae
  1. 8
      spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/metrics/MetricsClientHttpRequestInterceptor.java
  2. 5
      spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/metrics/MetricsInterceptorConfiguration.java

8
spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/metrics/MetricsClientHttpRequestInterceptor.java

@ -24,7 +24,6 @@ import org.springframework.http.client.ClientHttpRequestExecution; @@ -24,7 +24,6 @@ import org.springframework.http.client.ClientHttpRequestExecution;
import org.springframework.http.client.ClientHttpRequestInterceptor;
import org.springframework.http.client.ClientHttpResponse;
import com.netflix.servo.MonitorRegistry;
import com.netflix.servo.monitor.MonitorConfig;
import com.netflix.servo.tag.SmallTagMap;
import com.netflix.servo.tag.Tags;
@ -41,18 +40,15 @@ public class MetricsClientHttpRequestInterceptor implements ClientHttpRequestInt @@ -41,18 +40,15 @@ public class MetricsClientHttpRequestInterceptor implements ClientHttpRequestInt
* Boot (Actuator) provides a more general purpose abstraction for dimensional metrics
* systems, this can be moved there and rewritten against that abstraction.
*/
private final MonitorRegistry registry;
private final ServoMonitorCache servoMonitorCache;
private final Collection<MetricsTagProvider> tagProviders;
private final ServoMonitorCache servoMonitorCache;
private final String metricName;
public MetricsClientHttpRequestInterceptor(MonitorRegistry registry,
public MetricsClientHttpRequestInterceptor(
Collection<MetricsTagProvider> tagProviders,
ServoMonitorCache servoMonitorCache, String metricName) {
this.registry = registry;
this.tagProviders = tagProviders;
this.servoMonitorCache = servoMonitorCache;
this.metricName = metricName;

5
spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/metrics/MetricsInterceptorConfiguration.java

@ -15,7 +15,6 @@ package org.springframework.cloud.netflix.metrics; @@ -15,7 +15,6 @@ package org.springframework.cloud.netflix.metrics;
import java.util.ArrayList;
import com.netflix.servo.MonitorRegistry;
import org.aspectj.lang.JoinPoint;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.annotation.Value;
@ -85,9 +84,9 @@ public class MetricsInterceptorConfiguration { @@ -85,9 +84,9 @@ public class MetricsInterceptorConfiguration {
@Bean
MetricsClientHttpRequestInterceptor spectatorLoggingClientHttpRequestInterceptor(
MonitorRegistry registry, Collection<MetricsTagProvider> tagProviders,
Collection<MetricsTagProvider> tagProviders,
ServoMonitorCache servoMonitorCache) {
return new MetricsClientHttpRequestInterceptor(registry, tagProviders,
return new MetricsClientHttpRequestInterceptor(tagProviders,
servoMonitorCache, this.metricName);
}

Loading…
Cancel
Save