docs: public void readAndExport(MetricExporter metricExporter) {
      Span span =
          tracer
              .spanBuilder(spanName)
              .setRecordEvents(true)
              .setSampler(probabilitySampler)
              .startSpan();
      Scope scope = tracer.withSpan(span);
      try {
        ArrayList<Metric> metricsList = new ArrayList<>();
        for (MetricProducer metricProducer : metricProducerManager.getAllMetricProducer()) {
          metricsList.addAll(metricProducer.getMetrics());
        }
        metricExporter.export(metricsList);
      } catch (Throwable e) {
        logger.log(Level.WARNING, "Exception thrown by the metrics exporter.", e);
        span.setStatus(
            Status.UNKNOWN.withDescription("Exception when export metrics: " + exceptionMessage(e)));
      } finally {
        scope.close();
        span.end();
      }
    }