Polish micrometer rc.5 upgrade

Closes gh-11071
pull/11195/merge
Phillip Webb 7 years ago
parent 2e0a915281
commit e1306c6228

@ -37,7 +37,7 @@ import org.springframework.context.annotation.Configuration;
class MeterBindersConfiguration {
@Bean
@ConditionalOnProperty(value = "spring.metrics.binders.jvmmemory.enabled", havingValue = "true", matchIfMissing = true)
@ConditionalOnProperty(value = "spring.metrics.binders.jvmmemory.enabled", matchIfMissing = true)
@ConditionalOnMissingBean(JvmMemoryMetrics.class)
public JvmMemoryMetrics jvmMemoryMetrics() {
return new JvmMemoryMetrics();
@ -45,21 +45,21 @@ class MeterBindersConfiguration {
@Bean
@ConditionalOnMissingBean(LogbackMetrics.class)
@ConditionalOnProperty(value = "spring.metrics.binders.logback.enabled", havingValue = "true", matchIfMissing = true)
@ConditionalOnProperty(value = "spring.metrics.binders.logback.enabled", matchIfMissing = true)
@ConditionalOnClass(name = "ch.qos.logback.classic.Logger")
public LogbackMetrics logbackMetrics() {
return new LogbackMetrics();
}
@Bean
@ConditionalOnProperty(value = "spring.metrics.binders.uptime.enabled", havingValue = "true", matchIfMissing = true)
@ConditionalOnProperty(value = "spring.metrics.binders.uptime.enabled", matchIfMissing = true)
@ConditionalOnMissingBean(UptimeMetrics.class)
public UptimeMetrics uptimeMetrics() {
return new UptimeMetrics();
}
@Bean
@ConditionalOnProperty(value = "spring.metrics.binders.processor.enabled", havingValue = "true", matchIfMissing = true)
@ConditionalOnProperty(value = "spring.metrics.binders.processor.enabled", matchIfMissing = true)
@ConditionalOnMissingBean(ProcessorMetrics.class)
public ProcessorMetrics processorMetrics() {
return new ProcessorMetrics();

@ -43,6 +43,9 @@ public class SimpleProperties {
*/
private Duration step = Duration.ofSeconds(10);
/**
* Counting mode.
*/
private CountingMode mode = CountingMode.Cumulative;
public boolean getEnabled() {
@ -62,10 +65,11 @@ public class SimpleProperties {
}
public CountingMode getMode() {
return mode;
return this.mode;
}
public void setMode(CountingMode mode) {
this.mode = mode;
}
}

@ -55,4 +55,5 @@ public class SimplePropertiesConfigAdapter
public CountingMode mode() {
return get(SimpleProperties::getMode, SimpleConfig.super::mode);
}
}

Loading…
Cancel
Save