app/vlinsert/insertutils: add a link to docs why _msg field must be non-empty

This commit is contained in:
Aliaksandr Valialkin 2024-09-26 09:53:17 +02:00
parent 7c86835f3c
commit 6b775ca68c
No known key found for this signature in database
GPG key ID: 52C003EE2BCDB9EB

View file

@ -176,10 +176,11 @@ func (lmp *logMessageProcessor) AddRow(timestamp int64, fields []logstorage.Fiel
return return
} }
// _msg field must exist and not empty // _msg field must be non-empty according to VictoriaLogs data model.
// See https://docs.victoriametrics.com/victorialogs/keyconcepts/#message-field
msgExist := false msgExist := false
for i := range fields { for i := range fields {
if fields[i].Name == `_msg` { if fields[i].Name == "_msg" {
msgExist = len(fields[i].Value) > 0 msgExist = len(fields[i].Value) > 0
break break
} }