Skip to content

Commit 6103560

Browse files
authored
fix: Return Resource.K8sContainer when autodetecting resource type (#641)
According to https://cloud.google.com/stackdriver/docs/solutions/gke/migration#resource-changes container is legacy the new type is k8s_container.
1 parent 21ce710 commit 6103560

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

google-cloud-logging/src/main/java/com/google/cloud/logging/MonitoredResourceUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ private static Resource getAutoDetectedResourceType() {
226226
return Resource.GaeAppFlex;
227227
}
228228
if (System.getenv("KUBERNETES_SERVICE_HOST") != null) {
229-
return Resource.Container;
229+
return Resource.K8sContainer;
230230
}
231231
if (ServiceOptions.getAppEngineAppId() != null) {
232232
return Resource.GaeAppStandard;

0 commit comments

Comments
 (0)