if (patternStrings != null && patternStrings.length != 0) {
LOG.debug("got include tags pattern: "+ patternStrings);
for (String pstr : patternStrings) {
Matcher matcher = tagPattern.matcher(pstr);
if (!matcher.matches()) {
throw new MetricsException("Illegal tag pattern: "+ pstr);
}
setIncludeTagPattern(matcher.group(1), compile(matcher.group(2)));
}
}
patternStrings = conf.getStringArray(EXCLUDE_TAGS_KEY);
if (patternStrings != null && patternStrings.length != 0) {
LOG.debug("got exclude tags pattern: "+ patternStrings);
for (String pstr : patternStrings) {
Matcher matcher = tagPattern.matcher(pstr);
if (!matcher.matches()) {
throw new MetricsException("Illegal tag pattern: "+ pstr);
}
setExcludeTagPattern(matcher.group(1), compile(matcher.group(2)));
}
}
}