Commit af5c2360 by Jon Schneider

Servo and Spectator metrics defer to other Counter/GaugeService implementations

parent 86e16f58
......@@ -15,6 +15,8 @@ package org.springframework.cloud.netflix.metrics.servo;
import org.springframework.boot.actuate.autoconfigure.MetricRepositoryAutoConfiguration;
import org.springframework.boot.actuate.endpoint.MetricReaderPublicMetrics;
import org.springframework.boot.actuate.metrics.CounterService;
import org.springframework.boot.actuate.metrics.GaugeService;
import org.springframework.boot.actuate.metrics.reader.MetricReader;
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
......@@ -76,6 +78,7 @@ public class ServoMetricsAutoConfiguration {
}
@Bean
@ConditionalOnMissingBean({ CounterService.class, GaugeService.class })
public ServoMetricServices servoMetricServices(MonitorRegistry monitorRegistry) {
return new ServoMetricServices(monitorRegistry);
}
......
......@@ -16,6 +16,8 @@ package org.springframework.cloud.netflix.metrics.spectator;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.actuate.autoconfigure.MetricRepositoryAutoConfiguration;
import org.springframework.boot.actuate.endpoint.MetricReaderPublicMetrics;
import org.springframework.boot.actuate.metrics.CounterService;
import org.springframework.boot.actuate.metrics.GaugeService;
import org.springframework.boot.actuate.metrics.reader.MetricReader;
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
......@@ -71,6 +73,7 @@ public class SpectatorMetricsAutoConfiguration {
}
@Bean
@ConditionalOnMissingBean({ CounterService.class, GaugeService.class })
public SpectatorMetricServices spectatorMetricServices(Registry metricRegistry) {
return new SpectatorMetricServices(metricRegistry);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment