public CompletableFuture<MetricsValues> readMetricsValues(MetricsCondition condition, 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";
                }
                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);
                }
                return values;
            }
            return getMetricsQueryService().readMetricsValues(condition, duration);
        });
    }
Read time-series values in the duration of required metrics
oap-server/server-query-plugin/query-graphql-plugin/src/main/java/org/apache/skywalking/oap/query/graphql/resolver/MetricsQuery.java