code: @Nullable
      public static <T> T gauge(String name, Iterable<Tag> tags, T obj, ToDoubleFunction<T> valueFunction) {
          return globalRegistry.gauge(name, tags, obj, valueFunction);
      }
docs: Register a gauge that reports the value of the object after the function
  {@code valueFunction} is applied. The registration will keep a weak reference to the object so it will
  not prevent garbage collection. Applying {@code valueFunction} on the object should be thread safe.
  <p>
  If multiple gauges are registered with the same id, then the values will be aggregated and
  the sum will be reported. For example, registering multiple gauges for active threads in
  a thread pool with the same id would produce a value that is the overall number
  of active threads. For other behaviors, manage it on the user side and avoid multiple
  registrations.
  
  @param name          Name of the gauge being registered.
  @param tags          Sequence of dimensions for breaking down the name.
  @param obj           Object used to compute a value.
  @param valueFunction Function that is applied on the value for the number.
  @param <T>           The type of the state object from which the gauge value is extracted.
  @return The number that was passed in so the registration can be done as part of an assignment
  statement.