diff --git a/google-cloud-bigtable-stats/pom.xml b/google-cloud-bigtable-stats/pom.xml index 4ea560fde7..10b64dc466 100644 --- a/google-cloud-bigtable-stats/pom.xml +++ b/google-cloud-bigtable-stats/pom.xml @@ -68,15 +68,14 @@ com.google.cloud google-cloud-monitoring - com.google.http-client - google-http-client + google-http-client-gson com.google.http-client - google-http-client-gson + google-http-client @@ -132,6 +131,7 @@ jsr305 + com.google.http-client google-http-client 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 1d36adbf70..20fe21c5c2 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 @@ -133,16 +133,8 @@ static TimeSeries convertTimeSeries( List labelValues = timeSeries.getLabelValues(); for (int i = 0; i < labelValues.size(); i++) { if (PROMOTED_RESOURCE_LABELS.contains(labelKeys.get(i).getKey())) { - if (labelKeys.get(i).getKey().equals(BuiltinMeasureConstants.CLUSTER.getName()) - && labelValues.get(i).getValue().equals("undefined")) { - monitoredResourceBuilder.putLabels(labelKeys.get(i).getKey(), "global"); - } else if (labelKeys.get(i).getKey().equals(BuiltinMeasureConstants.ZONE.getName()) - && labelValues.get(i).getValue().equals("undefined")) { - monitoredResourceBuilder.putLabels(labelKeys.get(i).getKey(), "global"); - } else { - monitoredResourceBuilder.putLabels( - labelKeys.get(i).getKey(), labelValues.get(i).getValue()); - } + monitoredResourceBuilder.putLabels( + labelKeys.get(i).getKey(), labelValues.get(i).getValue()); } else { metricTagKeys.add(labelKeys.get(i)); metricTagValues.add(labelValues.get(i)); 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 199cf7936e..6cb24505b5 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,7 +40,7 @@ public class BigtableStackdriverStatsExporter { @GuardedBy("monitor") private static BigtableStackdriverStatsExporter instance = null; - private static final Duration EXPORT_INTERVAL = Duration.create(60, 0); + private static final Duration EXPORT_INTERVAL = Duration.create(600, 0); private static final String RESOURCE_TYPE = "bigtable_client_raw"; private final IntervalMetricReader intervalMetricReader; diff --git a/google-cloud-bigtable/pom.xml b/google-cloud-bigtable/pom.xml index c672d2f347..4872466846 100644 --- a/google-cloud-bigtable/pom.xml +++ b/google-cloud-bigtable/pom.xml @@ -146,6 +146,16 @@ grpc-alts runtime + + com.google.http-client + google-http-client + runtime + + + com.google.http-client + google-http-client-gson + runtime +