String[] patternStrings = conf.getStringArray(INCLUDE_TAGS_KEY);
if (patternStrings != null && patternStrings.length != 0) {
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) {
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)));
}
}
}