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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user