diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/statsd/StatsdProperties.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/statsd/StatsdProperties.java index 89b6d0294b..14bb18754e 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/statsd/StatsdProperties.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/statsd/StatsdProperties.java @@ -59,8 +59,8 @@ public class StatsdProperties { /** * How often gauges will be polled. When a gauge is polled, its value is recalculated - * and if the value has changed (or publishUnchangedMeters is true), - * it is sent to the StatsD server. + * and if the value has changed (or publishUnchangedMeters is true), it is sent to the + * StatsD server. */ private Duration pollingFrequency = Duration.ofSeconds(10); @@ -72,7 +72,7 @@ public class StatsdProperties { /** * Send unchanged meters to the StatsD server. */ - private Boolean publishUnchangedMeters = true; + private Boolean publishUnchangedMeters; public Boolean getEnabled() { return this.enabled; @@ -137,4 +137,5 @@ public class StatsdProperties { public void setPublishUnchangedMeters(Boolean publishUnchangedMeters) { this.publishUnchangedMeters = publishUnchangedMeters; } + } diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/statsd/StatsdPropertiesConfigAdapter.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/statsd/StatsdPropertiesConfigAdapter.java index 89e0b2de2a..cbc24ca5ec 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/statsd/StatsdPropertiesConfigAdapter.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/statsd/StatsdPropertiesConfigAdapter.java @@ -80,6 +80,8 @@ public class StatsdPropertiesConfigAdapter @Override public boolean publishUnchangedMeters() { - return get(StatsdProperties::getPublishUnchangedMeters, StatsdConfig.super::publishUnchangedMeters); + return get(StatsdProperties::getPublishUnchangedMeters, + StatsdConfig.super::publishUnchangedMeters); } + }