Skip to content

Commit

Permalink
fix: Return Resource.K8sContainer when autodetecting resource type (#641
Browse files Browse the repository at this point in the history
)

According to https://cloud.google.com/stackdriver/docs/solutions/gke/migration#resource-changes container is legacy the new type is k8s_container.
  • Loading branch information
wildhemp committed Sep 16, 2021
1 parent 21ce710 commit 6103560
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -226,7 +226,7 @@ private static Resource getAutoDetectedResourceType() {
return Resource.GaeAppFlex;
}
if (System.getenv("KUBERNETES_SERVICE_HOST") != null) {
return Resource.Container;
return Resource.K8sContainer;
}
if (ServiceOptions.getAppEngineAppId() != null) {
return Resource.GaeAppStandard;
Expand Down

0 comments on commit 6103560

Please sign in to comment.