docs: public static Metric toValidValue(Metric metric) {
      MonitorConfig cfg = metric.getConfig();
      MonitorConfig.Builder cfgBuilder = MonitorConfig.builder(toValidCharset(cfg.getName()));
      for (Tag orig : cfg.getTags()) {
        final String key = orig.getKey();
        if (RELAXED_GROUP_KEYS.contains(key)) {
          cfgBuilder.withTag(key, toValidCharsetTable(CHARS_ALLOWED_GROUPS, orig.getValue()));
        } else {
          cfgBuilder.withTag(toValidCharset(key), toValidCharset(orig.getValue()));
        }
      }
      cfgBuilder.withPublishingPolicy(cfg.getPublishingPolicy());
      return new Metric(cfgBuilder.build(), metric.getTimestamp(), metric.getValue());
    }