docs: public static Resource detectResource() {
      List<Resource> resourceList = new ArrayList<Resource>();
      resourceList.add(Resource.createFromEnvironmentVariables());
      if (System.getenv("KUBERNETES_SERVICE_HOST") != null) {
        resourceList.add(ContainerResource.detect());
        resourceList.add(K8sResource.detect());
      }
      resourceList.add(HostResource.detect());
      resourceList.add(CloudResource.detect());
      return firstNonNull(Resource.mergeResources(resourceList), EMPTY_RESOURCE);
    }