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;
/**
* 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;

@ -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();
}
}

Loading…
Cancel
Save