code: public Page<Metric> listMetricsAsync() throws ExecutionException, InterruptedException {
      // [START listMetricsAsync]
      Future<AsyncPage<Metric>> future = logging.listMetricsAsync(ListOption.pageSize(100));
      // ...
      AsyncPage<Metric> metrics = future.get();
      for (Metric metric : metrics.iterateAll()) {
        // do something with the metric
      }
      // [END listMetricsAsync]
      return metrics;
    }
docs: [TARGET listMetricsAsync(ListOption...)]