class MetricImporterUtils {

    public static Metric mergeWithExtraTags(Metric metric, Map<String, String> extraTags) {
        if (CollectionUtils.isEmpty(extraTags)) {
            return metric;
        }

        // 如果metric本身已经有的tag, 不要覆盖
        for (Map.Entry<String, String> e : extraTags.entrySet()) {
            metric.getTags().putIfAbsent(e.getKey(), e.getValue());
        }
        return metric;
    }

    private  MetricImporterUtils();

}