diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/BuiltInOpenTelemetryMetricsProvider.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/BuiltInOpenTelemetryMetricsProvider.java index ad177c1f36..42eb76711b 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/BuiltInOpenTelemetryMetricsProvider.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/BuiltInOpenTelemetryMetricsProvider.java @@ -94,7 +94,7 @@ static String detectClientLocation() { // All platform except GKE uses "cloud_region" for region attribute. String region = detectedPlatform.getAttributes().get("cloud_region"); if (detectedPlatform.getSupportedPlatform() == GOOGLE_KUBERNETES_ENGINE) { - region = detectedPlatform.getAttributes().get(AttributeKeys.GKE_LOCATION_TYPE_REGION); + region = detectedPlatform.getAttributes().get(AttributeKeys.GKE_CLUSTER_LOCATION); } return region == null ? "global" : region; }