Don't assume tags are present
@@ -231,10 +231,12 @@ func bareMetric(name string, tags string) *ssf.SSFSample {
metric := &ssf.SSFSample{}
metric.Name = name
metric.Tags = make(map[string]string)
+ if tags != "" {
for _, elem := range strings.Split(tags, ",") {
tag := strings.Split(elem, ":")
metric.Tags[tag[0]] = tag[1]
}
+ }
return metric
}
