code: public static synchronized <T> void registerGaugeIfAbsent(String name, Gauge<T> metric) {
      if (!METRIC_REGISTRY.getGauges().containsKey(name)) {
        METRIC_REGISTRY.register(name, metric);
      }
    }
docs: Registers a gauge if it has not been registered.
  
  @param name the gauge name
  @param metric the gauge
  @param <T> the type