@Deprecated
    public CompletableFuture<List<SelectedRecord>> readSampledRecords(TopNCondition condition, Duration duration) {
        return queryAsync(() -> {
            RecordCondition recordCondition = new RecordCondition(condition);
            if (!recordCondition.senseScope() || !recordCondition.getParentEntity().isValid()) {
                return Collections.emptyList();
            }
            final List<Record> records = getRecordQueryService().readRecords(recordCondition, duration);
            return records.stream().filter(Objects::nonNull).map(Record::toSelectedRecord).collect(Collectors.toList());
        });
    }
Read the sampled records.

@since 9.3.0 This query is replaced by {@link RecordQueryService#readRecords(RecordCondition, Duration)}
oap-server/server-query-plugin/query-graphql-plugin/src/main/java/org/apache/skywalking/oap/query/graphql/resolver/MetricsQuery.java