diff --git a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableExporterUtils.java b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableExporterUtils.java index 821c2295e..f6a8ba67f 100644 --- a/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableExporterUtils.java +++ b/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/stub/metrics/BigtableExporterUtils.java @@ -41,6 +41,7 @@ import com.google.cloud.opentelemetry.detection.GCPPlatformDetector; import com.google.common.base.MoreObjects; import com.google.common.base.Preconditions; +import com.google.common.base.Stopwatch; import com.google.common.collect.ImmutableSet; import com.google.monitoring.v3.Point; import com.google.monitoring.v3.TimeInterval; @@ -158,7 +159,9 @@ static List convertToApplicationResourceTimeSeries( @Nullable static MonitoredResource detectResource() { GCPPlatformDetector detector = GCPPlatformDetector.DEFAULT_INSTANCE; + Stopwatch stopwatch = Stopwatch.createStarted(); DetectedPlatform detectedPlatform = detector.detectPlatform(); + System.out.println("detect took" + stopwatch.elapsed()); MonitoredResource monitoredResource = null; try { switch (detectedPlatform.getSupportedPlatform()) {