docs: public boolean matches(MonitorConfig config) {
      String name = config.getName();
      TagList tags = config.getTags();
      String value;
      if (tagKey == null) {
        value = name;
      } else {
        Tag t = tags.getTag(tagKey);
        value = (t == null) ? null : t.getValue();
      }
  
      if (Strings.isNullOrEmpty(value)) {
        return root.matches(config);
      } else {
        String start = value.substring(0, 1);
        NavigableMap<String, MetricFilter> candidates =
            filters.subMap(start, true, value, true).descendingMap();
        if (candidates.isEmpty()) {
          return root.matches(config);
        } else {
          for (Map.Entry<String, MetricFilter> e : candidates.entrySet()) {
            if (value.startsWith(e.getKey())) {
              return e.getValue().matches(config);
            }
          }
          return root.matches(config);
        }
      }
    }