public <T> Gauge<T> newGauge(String name, final ValueFunction<T> valueFunc) {
    return registry.newGauge(groupName, new Gauge<T>((prefix + name).toLowerCase(), valueFunc.getValue()) {
      @Override
      public T getValue() {
        return valueFunc.getValue();
      }
    });
  }
MetricGroup is a little helper class to make it easy to register and
manage a group of counters, gauges and timers.  It's shared between Java
and Scala
samza-core/src/main/java/org/apache/samza/metrics/MetricGroup.java