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 dcaf939101..f41e5ce036 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 @@ -19,6 +19,7 @@ package org.springframework.boot.actuate.autoconfigure.metrics.export.statsd; import java.time.Duration; import io.micrometer.statsd.StatsdFlavor; +import io.micrometer.statsd.StatsdProtocol; import org.springframework.boot.context.properties.ConfigurationProperties; @@ -53,6 +54,11 @@ public class StatsdProperties { */ private Integer port = 8125; + /** + * Protocol of the StatsD server to receive exported metrics. + */ + private StatsdProtocol protocol = StatsdProtocol.UDP; + /** * Total length of a single payload should be kept within your network's MTU. */ @@ -102,6 +108,14 @@ public class StatsdProperties { this.port = port; } + public StatsdProtocol getProtocol() { + return this.protocol; + } + + public void setProtocol(StatsdProtocol protocol) { + this.protocol = protocol; + } + public Integer getMaxPacketLength() { return this.maxPacketLength; } 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 85961a759c..9913faa156 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 @@ -20,6 +20,7 @@ import java.time.Duration; import io.micrometer.statsd.StatsdConfig; import io.micrometer.statsd.StatsdFlavor; +import io.micrometer.statsd.StatsdProtocol; import org.springframework.boot.actuate.autoconfigure.metrics.export.properties.PropertiesConfigAdapter; @@ -65,6 +66,11 @@ public class StatsdPropertiesConfigAdapter extends PropertiesConfigAdapter