protected String sanitizeName(MetricName name) {
   final StringBuilder sb =
       new StringBuilder().append(name.getGroup()).append('.').append(name.getType()).append('.');
   if (name.hasScope()) {
     sb.append(name.getScope()).append('.');
   }
   return sb.append(name.getName()).toString();
 }
 // The service name for a given metric.
 public String service(MetricName name, String... rest) {
   final StringBuilder sb = new StringBuilder();
   if (null != c.prefix) {
     sb.append(c.prefix).append(c.separator);
   }
   sb.append(name.getGroup()).append(c.separator).append(name.getType()).append(c.separator);
   if (name.hasScope()) {
     sb.append(name.getScope()).append(c.separator);
   }
   sb.append(name.getName());
   for (String part : rest) {
     sb.append(c.separator);
     sb.append(part);
   }
   return sb.toString();
 }