Deprecate queue size property for StatsD metrics export
Closes gh-13108
This commit is contained in:
@@ -21,6 +21,7 @@ import java.time.Duration;
|
||||
import io.micrometer.statsd.StatsdFlavor;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.boot.context.properties.DeprecatedConfigurationProperty;
|
||||
|
||||
/**
|
||||
* {@link ConfigurationProperties} for configuring StatsD metrics export.
|
||||
@@ -122,10 +123,13 @@ public class StatsdProperties {
|
||||
this.pollingFrequency = pollingFrequency;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@DeprecatedConfigurationProperty(reason = "No longer configurable and an unbounded queue will always be used")
|
||||
public Integer getQueueSize() {
|
||||
return this.queueSize;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void setQueueSize(Integer queueSize) {
|
||||
this.queueSize = queueSize;
|
||||
}
|
||||
|
||||
@@ -74,6 +74,7 @@ public class StatsdPropertiesConfigAdapter
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public int queueSize() {
|
||||
return get(StatsdProperties::getQueueSize, StatsdConfig.super::queueSize);
|
||||
}
|
||||
|
||||
@@ -280,7 +280,10 @@
|
||||
},
|
||||
{
|
||||
"name": "management.metrics.export.statsd.queue-size",
|
||||
"defaultValue": 2147483647
|
||||
"defaultValue": 2147483647,
|
||||
"deprecation": {
|
||||
"level": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "management.trace.http.enabled",
|
||||
|
||||
@@ -38,7 +38,6 @@ public class StatsdPropertiesTests {
|
||||
assertThat(properties.getPort()).isEqualTo(config.port());
|
||||
assertThat(properties.getMaxPacketLength()).isEqualTo(config.maxPacketLength());
|
||||
assertThat(properties.getPollingFrequency()).isEqualTo(config.pollingFrequency());
|
||||
assertThat(properties.getQueueSize()).isEqualTo(config.queueSize());
|
||||
assertThat(properties.isPublishUnchangedMeters())
|
||||
.isEqualTo(config.publishUnchangedMeters());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user