public static MetricsType typeOfMetrics(String metricsName) {
        final Optional<ValueColumnMetadata.ValueColumn> valueColumn
            = ValueColumnMetadata.INSTANCE.readValueColumnDefinition(metricsName);
        if (valueColumn.isPresent()) {
            switch (valueColumn.get().getDataType()) {
                case COMMON_VALUE:
                    return MetricsType.REGULAR_VALUE;
                case LABELED_VALUE:
                    return MetricsType.LABELED_VALUE;
                case HISTOGRAM:
                    return MetricsType.HEATMAP;
                case SAMPLED_RECORD:
                    return MetricsType.SAMPLED_RECORD;
                case NOT_VALUE:
                default:
                    return MetricsType.UNKNOWN;
            }
        } else {
            return MetricsType.UNKNOWN;
        }
    }
MetricsMetadataQueryService provides the metadata of metrics to other modules.
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/query/MetricsMetadataQueryService.java