public static Map<String, MetricsReporter> getMetricsReporters(MetricsConfig metricsConfig, String containerName) {
    Map<String, MetricsReporter> metricsReporters = new HashMap<>();
    List<String> metricsReporterNames = metricsConfig.getMetricReporterNames();
    for (String metricsReporterName : metricsReporterNames) {
      String metricsFactoryClassName = metricsConfig.getMetricsFactoryClass(metricsReporterName)
          .orElseThrow(() -> new SamzaException(
              String.format("Metrics reporter %s missing .class config", metricsReporterName)));
      MetricsReporterFactory metricsReporterFactory =
          ReflectionUtil.getObj(metricsFactoryClassName, MetricsReporterFactory.class);
      metricsReporters.put(metricsReporterName,
                           metricsReporterFactory.getMetricsReporter(metricsReporterName,
                                                                     containerName,
                                                                     metricsConfig));
    }
    return metricsReporters;
  }
Helper class that instantiates the MetricsReporter.
samza-core/src/main/java/org/apache/samza/util/MetricsReporterLoader.java