public static String meterToKind(Registry registry, Meter meter) {
    String kind;
    if (meter instanceof Timer) {
      kind = "Timer";
    } else if (meter instanceof Counter) {
      kind = "Counter";
    } else if (meter instanceof Gauge) {
      kind = "Gauge";
    } else if (meter instanceof DistributionSummary) {
      kind = "DistributionSummary";
    } else {
      kind = meter.getClass().getSimpleName();
    }
    return kind;
  }
public static String meterToKind ( Registry registry , Meter meter ) { String kind ; if ( meter instanceof Timer ) { kind = "Timer" ; } else if ( meter instanceof Counter ) { kind = "Counter" ; } else if ( meter instanceof Gauge ) { kind = "Gauge" ; } else if ( meter instanceof DistributionSummary ) { kind = "DistributionSummary" ; } else { kind = meter . getClass ( ) . getSimpleName ( ) ; } return kind ; }
Determine the type of a meter for reporting purposes.

@param registry
Used to provide supplemental information (e.g. to search for the meter).

@param meter
The meters whose kind we want to know.

@return
A string such as "Counter". If the type cannot be identified as one of
the standard Spectator api interface variants, then the simple class name
is returned.