Skip to content

Commit

Permalink
Fix error sending empty tag value in azure monitor output (#5083)
Browse files Browse the repository at this point in the history
(cherry picked from commit f794d5b)
  • Loading branch information
raphaelquati authored and danielnelson committed Dec 13, 2018
1 parent fb6a41b commit 041ac82
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugins/outputs/azure_monitor/azure_monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,10 @@ func hashIDWithTagKeysOnly(m telegraf.Metric) uint64 {
h.Write([]byte(m.Name()))
h.Write([]byte("\n"))
for _, tag := range m.TagList() {
if tag.Key == "" || tag.Value == "" {
continue
}

h.Write([]byte(tag.Key))
h.Write([]byte("\n"))
}
Expand Down

0 comments on commit 041ac82

Please sign in to comment.