public CompletableFuture<List<MetricDefinition>> listMetrics(String regex) {
        return queryAsync(() -> getMetricsMetadataQueryService().listMetrics(regex));
    }
Get the list of all available metrics in the current OAP server.

@param regex to filter the metrics by name, if existing.
@return all available metrics.
oap-server/server-query-plugin/query-graphql-plugin/src/main/java/org/apache/skywalking/oap/query/graphql/resolver/MetricsQuery.java