Remove tags with empty values from Wavefront output (#4266)
(cherry picked from commit d2e729dfaf
)
This commit is contained in:
parent
c7e5bbb25e
commit
3e56a3dcc9
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue