Refactor annotations for metric export

Users can add @ExportMetric[Reader,Writer] to readers and writers that
they want to participate in the default exporter. There is also still an
@ActuatorMetricWriter that is used for the legacy (non-Java8) Gauge and
CounterServices.
This commit is contained in:
Dave Syer
2015-05-31 12:51:07 +01:00
parent 80ff92919c
commit 8a83bd12bd
9 changed files with 112 additions and 49 deletions

View File

@@ -116,6 +116,7 @@ public class MetricExportAutoConfigurationTests {
public static class WriterConfig {
@Bean
@ExportMetricWriter
public MetricWriter writer() {
return Mockito.mock(MetricWriter.class);
}
@@ -126,6 +127,7 @@ public class MetricExportAutoConfigurationTests {
public static class MetricEndpointConfiguration {
@Bean
@ExportMetricReader
public MetricsEndpointMetricReader endpointReader() {
return Mockito.mock(MetricsEndpointMetricReader.class);
}