diff --git a/plugins/outputs/azure_monitor/azure_monitor.go b/plugins/outputs/azure_monitor/azure_monitor.go index 5c435ac0dbb9b..e52d66b991d9b 100644 --- a/plugins/outputs/azure_monitor/azure_monitor.go +++ b/plugins/outputs/azure_monitor/azure_monitor.go @@ -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")) }