private MetricFamilySamples createFamilySample(
      MetricDefine define, List<MetricKey> keys, Map<MetricKey, Metric> registeredMetrics) {

    List<MetricFamilySamples.Sample> samples = Lists.newArrayList();
    for (MetricKey key : keys) {
      Metric metric = registeredMetrics.get(key);

      MetricFamilySamples.Sample sample =
          new MetricFamilySamples.Sample(
              PREFIX + define.getName(), define.getTags(), key.valueOfTags(), covertValue(metric));
      samples.add(sample);
    }

    return new MetricFamilySamples(
        PREFIX + define.getName(), covertType(define.getType()), define.getDescription(), samples);
  }
Metric type converter for prometheus api
amoro-metrics/amoro-metrics-prometheus/src/main/java/org/apache/amoro/metrics/promethues/MetricsCollector.java