public CompletableFuture<List<MetricsValues>> readLabeledMetricsValues(MetricsCondition condition,
                                                        List<String> labels,
                                                        Duration duration) {
        return queryAsync(() -> {
            boolean hasScope = condition.senseScope();
            if (!hasScope || !condition.getEntity().isValid()) {
                final List<PointOfTime> pointOfTimes = duration.assembleDurationPoints();
                String entityId = "UNKNOWN_METRIC_NAME";
                if (hasScope) {
                    entityId = "ILLEGAL_ENTITY";
                }
                List<MetricsValues> labeledValues = new ArrayList<>(labels.size());
                for (String label : labels) {
                    MetricsValues values = new MetricsValues();
                    for (PointOfTime pointOfTime : pointOfTimes) {
                        String id = pointOfTime.id(entityId);
                        final KVInt kvInt = new KVInt();
                        kvInt.setId(id);
                        kvInt.setValue(0);
                        kvInt.setEmptyValue(true);
                        values.getValues().addKVInt(kvInt);
                    }
                    values.setLabel(label);
                    labeledValues.add(values);
                }
                return labeledValues;
            }
            List<KeyValue> labelList = new ArrayList<>();
            String labelValue = labels.stream().reduce((a, b) -> a + Const.COMMA + b).orElse("");
            labelList.add(new KeyValue(DataLabel.GENERAL_LABEL_NAME, labelValue));
            return getMetricsQueryService().readLabeledMetricsValues(condition, labelList, duration);
        });
    }
Read value in the given time duration, usually as a linear.

@param labels the labels you need to query.
oap-server/server-query-plugin/query-graphql-plugin/src/main/java/org/apache/skywalking/oap/query/graphql/resolver/MetricsQuery.java