public AutoGauge getAutoGauge(String name, MetricLevel metricLevel, String... tags) {
    if (invalid(metricLevel, name, tags)) {
      return DoNothingMetricManager.DO_NOTHING_AUTO_GAUGE;
    }
    MetricInfo metricInfo = new MetricInfo(MetricType.AUTO_GAUGE, name, tags);
    IMetric metric = metrics.get(metricInfo);
    if (metric == null) {
      return DoNothingMetricManager.DO_NOTHING_AUTO_GAUGE;
    } else if (metric instanceof AutoGauge) {
      return (AutoGauge) metric;
    }
    throw new IllegalArgumentException(metricInfo + ALREADY_EXISTS);
  }
Get autoGauge.

@param name the name of name
@param metricLevel the level of name
@throws IllegalArgumentException when there has different type metric with same name
iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/AbstractMetricManager.java