diff --git a/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BigtableStackdriverExportUtils.java b/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BigtableStackdriverExportUtils.java index 3dfbcaaf25..b18df6d4a8 100644 --- a/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BigtableStackdriverExportUtils.java +++ b/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BigtableStackdriverExportUtils.java @@ -98,8 +98,8 @@ class BigtableStackdriverExportUtils { BuiltinMeasureConstants.ZONE.getName(), BuiltinMeasureConstants.TABLE.getName()); - private static final LabelKey clientIdLabelKey = - LabelKey.create(BuiltinMeasureConstants.CLIENT_UID.getName(), "client id"); + private static final LabelKey CLIENT_UID_LABEL_KEY = + LabelKey.create(BuiltinMeasureConstants.CLIENT_UID.getName(), "client uid"); static com.google.monitoring.v3.TimeSeries convertTimeSeries( MetricDescriptor metricDescriptor, @@ -127,7 +127,7 @@ static com.google.monitoring.v3.TimeSeries convertTimeSeries( metricTagValues.add(labelValues.get(i)); } } - metricTagKeys.add(clientIdLabelKey); + metricTagKeys.add(CLIENT_UID_LABEL_KEY); metricTagValues.add(LabelValue.create(clientId)); com.google.monitoring.v3.TimeSeries.Builder builder = @@ -162,9 +162,6 @@ static String getDefaultTaskValue() { private static MetricKind createMetricKind(Type type) { switch (type) { - case GAUGE_INT64: - case GAUGE_DOUBLE: - return MetricKind.GAUGE; case CUMULATIVE_DOUBLE: case CUMULATIVE_INT64: case CUMULATIVE_DISTRIBUTION: @@ -176,13 +173,10 @@ private static MetricKind createMetricKind(Type type) { private static com.google.api.MetricDescriptor.ValueType createValueType(Type type) { switch (type) { - case GAUGE_DOUBLE: case CUMULATIVE_DOUBLE: return com.google.api.MetricDescriptor.ValueType.DOUBLE; - case GAUGE_INT64: case CUMULATIVE_INT64: return com.google.api.MetricDescriptor.ValueType.INT64; - case GAUGE_DISTRIBUTION: case CUMULATIVE_DISTRIBUTION: return com.google.api.MetricDescriptor.ValueType.DISTRIBUTION; default: diff --git a/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BigtableStackdriverStatsExporter.java b/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BigtableStackdriverStatsExporter.java index d9d2ed94f1..f4f0985700 100644 --- a/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BigtableStackdriverStatsExporter.java +++ b/google-cloud-bigtable-stats/src/main/java/com/google/cloud/bigtable/stats/BigtableStackdriverStatsExporter.java @@ -40,8 +40,8 @@ public class BigtableStackdriverStatsExporter { @GuardedBy("lock") private static BigtableStackdriverStatsExporter instance = null; - // Default export interval is 5 minutes - private static final Duration EXPORT_INTERVAL = Duration.create(60 * 5, 0); + // Default export interval is 1 minute + private static final Duration EXPORT_INTERVAL = Duration.create(60, 0); private static final String RESOURCE_TYPE = "bigtable_client_raw"; private final IntervalMetricReader intervalMetricReader;