code: private static GroupName nameFromObjectName(ObjectName obj_name, NamedResolverMap resolvedMap) {
          String name = obj_name.getKeyProperty("name");
          String type = obj_name.getKeyProperty("type");
          String domain = obj_name.getDomain();
  
          Map<String, MetricValue> tags = obj_name.getKeyPropertyList().entrySet().stream()
                  .filter((entry) -> !entry.getKey().equals("name"))
                  .filter((entry) -> !entry.getKey().equals("type"))
                  .map(Tag::valueOf)
                  .collect(Collectors.toMap((Tag t) -> t.getName(), (Tag t) -> t.getValue()));
  
          final List<String> path = new ArrayList<>();
          if (name != null) {
              path.addAll(Arrays.asList(name.split("\\.")));
          } else if (type != null) {
              path.addAll(Arrays.asList(domain.split("\\.")));
              path.add(type);
          } else {
              path.addAll(Arrays.asList(domain.split("\\.")));
          }
          return resolvedMap.getGroupName(path, tags);
      }
docs: Extract a metric group name from a JMX ObjectName.
  
  @param obj_name a JMX object name from which to derive a metric name.
  @param resolvedMap a resolver map to use when generating the group name.
  @return A metric name for the given ObjectName, with tags.