public CompletableFuture<List<SelectedRecord>> sortMetrics(TopNCondition condition, Duration duration) {
        return queryAsync(() -> {
            if (!condition.senseScope()) {
                return Collections.emptyList();
            }
            return getQueryService().sortMetrics(condition, duration);
        });
    }
Read entity list of required metrics and parent entity type.
oap-server/server-query-plugin/query-graphql-plugin/src/main/java/org/apache/skywalking/oap/query/graphql/resolver/MetricsQuery.java