Remove tags with empty values from Wavefront output (#4266)

This commit is contained in:
Pierre Tessier 2018-06-11 17:54:08 -04:00 committed by Daniel Nelson
parent b30832dbb1
commit 5ea289dc9d
1 changed files with 8 additions and 0 deletions

View File

@ -180,6 +180,14 @@ func buildMetrics(m telegraf.Metric, w *Wavefront) []*MetricPoint {
} }
func buildTags(mTags map[string]string, w *Wavefront) (string, map[string]string) { func buildTags(mTags map[string]string, w *Wavefront) (string, map[string]string) {
// Remove all empty tags.
for k, v := range mTags {
if v == "" {
delete(mTags, k)
}
}
var source string var source string
sourceTagFound := false sourceTagFound := false