class PrometheusMetricsSystem implements ObservableMetricsSystem {

  public static ObservableMetricsSystem init(final MetricsConfiguration metricsConfiguration) {
    if (!metricsConfiguration.isEnabled() && !metricsConfiguration.isPushEnabled()) {
      return new NoOpMetricsSystem();
    }
    final PrometheusMetricsSystem metricsSystem =
        new PrometheusMetricsSystem(
            metricsConfiguration.getMetricCategories(), metricsConfiguration.isTimersEnabled());
    if (metricsSystem.isCategoryEnabled(StandardMetricCategory.PROCESS)) {
      metricsSystem.collectors.put(
          StandardMetricCategory.PROCESS,
          singleton(new StandardExports().register(metricsSystem.registry)));
    }
    if (metricsSystem.isCategoryEnabled(StandardMetricCategory.JVM)) {
      metricsSystem.collectors.put(
          StandardMetricCategory.JVM,
          asList(
              new MemoryPoolsExports().register(metricsSystem.registry),
              new BufferPoolsExports().register(metricsSystem.registry),
              new GarbageCollectorExports().register(metricsSystem.registry),
              new ThreadExports().register(metricsSystem.registry),
              new ClassLoadingExports().register(metricsSystem.registry)));
    }
    return metricsSystem;
  }

    PrometheusMetricsSystem(
      final Set<MetricCategory> enabledCategories, final boolean timersEnabled);

}