From 3ab36074dca2c73f13b0ea6a336c53882d897874 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Mon, 3 Oct 2022 14:28:23 +0100 Subject: [PATCH] Make management.tracing.enabled are first-class property This will allow metadata to be generated for it automatically. Closes gh-31656 --- .../autoconfigure/tracing/TracingProperties.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/tracing/TracingProperties.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/tracing/TracingProperties.java index 1aca4a5339..500772f276 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/tracing/TracingProperties.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/tracing/TracingProperties.java @@ -30,6 +30,11 @@ import org.springframework.boot.context.properties.ConfigurationProperties; @ConfigurationProperties("management.tracing") public class TracingProperties { + /** + * Whether auto-configuration of tracing is enabled. + */ + private boolean enabled = true; + /** * Sampling configuration. */ @@ -45,6 +50,14 @@ public class TracingProperties { */ private final Propagation propagation = new Propagation(); + public boolean isEnabled() { + return this.enabled; + } + + public void setEnabled(boolean enabled) { + this.enabled = enabled; + } + public Sampling getSampling() { return this.sampling; }