code: public void add(final String metricsName, final MetricsBase theMetricsObj) {
      if (metricsList.putIfAbsent(metricsName, theMetricsObj) != null) {
        throw new IllegalArgumentException("Duplicate metricsName:" + metricsName);
      }
    }
docs: Add a new metrics to the registry
  @param metricsName - the name
  @param theMetricsObj - the metrics
  @throws IllegalArgumentException if a name is already registered