Polish "Expose Stackdriver's useSemanticMetricTypes property"

See gh-28403
pull/28436/head
Andy Wilkinson 3 years ago
parent 9397121a98
commit 284725f5be

@ -48,10 +48,9 @@ public class StackdriverProperties extends StepRegistryProperties {
private Map<String, String> resourceLabels; private Map<String, String> resourceLabels;
/** /**
* Whether to use semantically correct metric types. When this is false, counter * Whether to use semantically correct metric types. When false, counter metrics are
* metrics are published as the GAUGE MetricKind. When this is true, counter metrics * published as the GAUGE MetricKind. When true, counter metrics are published as the
* are published as the CUMULATIVE MetricKind. This is false by default for the sake * CUMULATIVE MetricKind.
* of backwards compatibility.
*/ */
private boolean useSemanticMetricTypes = false; private boolean useSemanticMetricTypes = false;

@ -60,8 +60,6 @@ class StackdriverPropertiesConfigAdapterTests {
StackdriverProperties properties = new StackdriverProperties(); StackdriverProperties properties = new StackdriverProperties();
properties.setUseSemanticMetricTypes(true); properties.setUseSemanticMetricTypes(true);
assertThat(new StackdriverPropertiesConfigAdapter(properties).useSemanticMetricTypes()).isTrue(); assertThat(new StackdriverPropertiesConfigAdapter(properties).useSemanticMetricTypes()).isTrue();
properties.setUseSemanticMetricTypes(false);
assertThat(new StackdriverPropertiesConfigAdapter(properties).useSemanticMetricTypes()).isFalse();
} }
} }

Loading…
Cancel
Save