public void remove(MetricType type, String name, String... tags) {
    MetricInfo metricInfo = new MetricInfo(type, name, tags);
    if (metrics.containsKey(metricInfo)) {
      if (type == metricInfo.getMetaInfo().getType()) {
        notifyReporterOnRemove(metrics.get(metricInfo), metricInfo);
        nameToMetaInfo.remove(metricInfo.getName());
        metrics.remove(metricInfo);
        removeMetric(type, metricInfo);
      } else {
        throw new IllegalArgumentException(
            metricInfo + " failed to remove because the mismatch of type. ");
      }
    }
  }
remove name.

@param type the type of name
@param name the name of name
@param tags string pairs, like sg="ln" will be "sg", "ln"
@throws IllegalArgumentException when there has different type metric with same name
iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/AbstractMetricManager.java