code: public static ReportingRule fromKnownInputs(@Nullable final String[] logs,
        @Nullable Set<String> metricNames, @Nullable Set<String> labelNames) {
      log.atFine().log(
          "creating rule from log names %s, metric names %s, labelNames %s",
          new LazyArg<String>() {
            public String evaluate() {
              return Arrays.toString(logs);
            }
          }, metricNames, labelNames);
      Map<String, KnownMetrics> namedRuleMetrics = Maps.newHashMap();
      if (metricNames != null) {
        for (KnownMetrics m : KnownMetrics.values()) {
          if (m.getUpdater() == null || !metricNames.contains(m.getName())) {
            continue;
          }
          log.atFine().log("Adding metric named '%s' to the rule", m.getName());
          namedRuleMetrics.put(m.getName(), m);
        }
      }
      Map<String, KnownLabels> namedRuleLabels = Maps.newHashMap();
      if (labelNames != null) {
        for (KnownLabels k : KnownLabels.values()) {
          if (k.getUpdater() == null || !labelNames.contains(k.getName())) {
            continue;
          }
          log.atFine().log("Adding label named '%s' to the rule", k.getName());
          namedRuleLabels.put(k.getName(), k);
        }
      }
      return new ReportingRule(logs,
          namedRuleMetrics.values().toArray(new KnownMetrics[namedRuleMetrics.size()]),
          namedRuleLabels.values().toArray(new KnownLabels[namedRuleLabels.size()]));
    }
docs: 'Constructor' that uses names of known {@code KnownMetrics} and {@code KnownLabels}.
  
  Names that don't correspond to actual instances are ignored, as are instances where there is
  not yet an update function that will modify a {@code ReportRequest}
  
  @param logs the {@code logs} for which entries will be added {@code ReportRequests}
  @param metricNames the names of the {@code KnownMetrics} to use
  @param labelNames the names of the {@code KnownLabels} to use
  @return {@code ReportingRule}