From 284725f5becb38866eddcd7128cab59c7cb17583 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Thu, 21 Oct 2021 17:57:23 +0100 Subject: [PATCH] Polish "Expose Stackdriver's useSemanticMetricTypes property" See gh-28403 --- .../metrics/export/stackdriver/StackdriverProperties.java | 7 +++---- .../StackdriverPropertiesConfigAdapterTests.java | 2 -- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/stackdriver/StackdriverProperties.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/stackdriver/StackdriverProperties.java index 298e65cf19..e1121e9289 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/stackdriver/StackdriverProperties.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/stackdriver/StackdriverProperties.java @@ -48,10 +48,9 @@ public class StackdriverProperties extends StepRegistryProperties { private Map resourceLabels; /** - * Whether to use semantically correct metric types. When this is false, counter - * metrics are published as the GAUGE MetricKind. When this is true, counter metrics - * are published as the CUMULATIVE MetricKind. This is false by default for the sake - * of backwards compatibility. + * Whether to use semantically correct metric types. When false, counter metrics are + * published as the GAUGE MetricKind. When true, counter metrics are published as the + * CUMULATIVE MetricKind. */ private boolean useSemanticMetricTypes = false; diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/export/stackdriver/StackdriverPropertiesConfigAdapterTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/export/stackdriver/StackdriverPropertiesConfigAdapterTests.java index 4f89e9d3db..d04b5410af 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/export/stackdriver/StackdriverPropertiesConfigAdapterTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/export/stackdriver/StackdriverPropertiesConfigAdapterTests.java @@ -60,8 +60,6 @@ class StackdriverPropertiesConfigAdapterTests { StackdriverProperties properties = new StackdriverProperties(); properties.setUseSemanticMetricTypes(true); assertThat(new StackdriverPropertiesConfigAdapter(properties).useSemanticMetricTypes()).isTrue(); - properties.setUseSemanticMetricTypes(false); - assertThat(new StackdriverPropertiesConfigAdapter(properties).useSemanticMetricTypes()).isFalse(); } }