code: public ServiceFuture<List<ResourceMetricInner>> listMetricsAsync(final String resourceGroupName, final String name, final Boolean details, final String filter, final ListOperationCallback<ResourceMetricInner> serviceCallback) {
          return AzureServiceFuture.fromPageResponse(
              listMetricsSinglePageAsync(resourceGroupName, name, details, filter),
              new Func1<String, Observable<ServiceResponse<Page<ResourceMetricInner>>>>() {
                  @Override
                  public Observable<ServiceResponse<Page<ResourceMetricInner>>> call(String nextPageLink) {
                      return listMetricsNextSinglePageAsync(nextPageLink);
                  }
              },
              serviceCallback);
      }
docs: Get metrics for an App Serice plan.
  Get metrics for an App Serice plan.
  
  @param resourceGroupName Name of the resource group to which the resource belongs.
  @param name Name of the App Service plan.
  @param details Specify &lt;code&gt;true&lt;/code&gt; to include instance details. The default is &lt;code&gt;false&lt;/code&gt;.
  @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'.
  @param serviceCallback the async ServiceCallback to handle successful and failed responses.
  @throws IllegalArgumentException thrown if parameters fail the validation
  @return the {@link ServiceFuture} object