public override bool Accepts(MetricsTag tag) { // Accept if whitelisted Pattern ipat = includeTagPatterns[tag.Name()]; if (ipat != null && ipat.Matcher(tag.Value()).Matches()) { return(true); } // Reject if blacklisted Pattern epat = excludeTagPatterns[tag.Name()]; if (epat != null && epat.Matcher(tag.Value()).Matches()) { return(false); } // Reject if no match in whitelist only mode if (!includeTagPatterns.IsEmpty() && excludeTagPatterns.IsEmpty()) { return(false); } return(true); }
private void SetAttrCacheTag(MetricsTag tag, int recNo) { string key = TagName(tag.Name(), recNo); attrCache[key] = new Attribute(key, tag.Value()); }