From 73090582827d4a85eb148ba45f69aeb169cb675f Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Thu, 26 Sep 2024 09:53:17 +0200 Subject: [PATCH] app/vlinsert/insertutils: add a link to docs why _msg field must be non-empty --- app/vlinsert/insertutils/common_params.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/vlinsert/insertutils/common_params.go b/app/vlinsert/insertutils/common_params.go index df4df79c4..733079ce0 100644 --- a/app/vlinsert/insertutils/common_params.go +++ b/app/vlinsert/insertutils/common_params.go @@ -176,10 +176,11 @@ func (lmp *logMessageProcessor) AddRow(timestamp int64, fields []logstorage.Fiel 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 for i := range fields { - if fields[i].Name == `_msg` { + if fields[i].Name == "_msg" { msgExist = len(fields[i].Value) > 0 break }