Added localonly/globalonly
@@ -77,8 +77,18 @@ func ParseMetricSSF(metric *ssf.SSFSample) (*UDPMetric, error) {
// TODO: figure out localonly vs globalonly
tempTags := make([]string, len(metric.Tags))
for key, value := range metric.Tags {
+ if key == "veneurlocalonly" {
+ // delete the tag from the list
+ ret.Scope = LocalOnly
+ break
+ } else if key == "veneurglobalonly" {
+ // delete the tag from the list
+ ret.Scope = GlobalOnly
+ break
+ } else {
tempTags = append(tempTags, fmt.Sprintf("%s:%s", key, value))
}
+ }
sort.Strings(tempTags)
ret.Tags = tempTags
ret.JoinedTags = strings.Join(tempTags, ",")
