private Object extractValue(final MetricDataType type, final PointData point) {
    switch (type) {
      case LONG_GAUGE:
      case LONG_SUM:
        return ((LongPointData) point).getValue();
      case DOUBLE_GAUGE:
        return ((DoublePointData) point).getValue();
      case SUMMARY:
        return ((SummaryPointData) point).getValues();
      case HISTOGRAM:
        return ((HistogramPointData) point).getCounts();
      default:
        throw new UnsupportedOperationException("Unsupported type " + type);
    }
  }
Instantiates a new Open telemetry system.

@param enabledCategories the enabled categories
@param timersEnabled the timers enabled
@param jobName the job name
@param setAsGlobal the set as global
metrics/core/src/main/java/org/hyperledger/besu/metrics/opentelemetry/OpenTelemetrySystem.java