diff --git a/app/vlinsert/insertutils/common_params.go b/app/vlinsert/insertutils/common_params.go index a42cb3b1f950..23f100775dd1 100644 --- a/app/vlinsert/insertutils/common_params.go +++ b/app/vlinsert/insertutils/common_params.go @@ -75,9 +75,8 @@ func GetCommonParams(r *http.Request) (*CommonParams, error) { func (cp *CommonParams) GetProcessLogMessageFunc(lr *logstorage.LogRows) func(timestamp int64, fields []logstorage.Field) { return func(timestamp int64, fields []logstorage.Field) { if len(fields) > *MaxFieldsPerLine { - var rf logstorage.RowFormatter - rf = append(rf[:0], fields...) - logger.Warnf("dropping log line with %d fields; it exceeds -insert.maxFieldsPerLine=%d; %s", len(fields), *MaxFieldsPerLine, rf.String()) + rf := logstorage.RowFormatter(fields) + logger.Warnf("dropping log line with %d fields; it exceeds -insert.maxFieldsPerLine=%d; %s", len(fields), *MaxFieldsPerLine, rf) rowsDroppedTotalTooManyFields.Inc() return } diff --git a/app/vlinsert/insertutils/flags.go b/app/vlinsert/insertutils/flags.go index f1b28a88c392..403e315f218a 100644 --- a/app/vlinsert/insertutils/flags.go +++ b/app/vlinsert/insertutils/flags.go @@ -11,5 +11,5 @@ var ( MaxLineSizeBytes = flagutil.NewBytes("insert.maxLineSizeBytes", 256*1024, "The maximum size of a single line, which can be read by /insert/* handlers") // MaxFieldsPerLine is the maximum number of fields per line for /insert/* handlers - MaxFieldsPerLine = flag.Int("insert.maxFieldsPerLine", 1000, "The maximum number of fields per line, which can be read by /insert/* handlers") + MaxFieldsPerLine = flag.Int("insert.maxFieldsPerLine", 1000, "The maximum number of log fields per line, which can be read by /insert/* handlers") ) diff --git a/docs/VictoriaLogs/README.md b/docs/VictoriaLogs/README.md index 0990d2e18779..22c722cc1d08 100644 --- a/docs/VictoriaLogs/README.md +++ b/docs/VictoriaLogs/README.md @@ -172,7 +172,7 @@ Pass `-help` to VictoriaLogs in order to see the list of supported command-line -inmemoryDataFlushInterval duration The interval for guaranteed saving of in-memory data to disk. The saved data survives unclean shutdowns such as OOM crash, hardware reset, SIGKILL, etc. Bigger intervals may help increase the lifetime of flash storage with limited write cycles (e.g. Raspberry PI). Smaller intervals increase disk IO load. Minimum supported value is 1s (default 5s) -insert.maxFieldsPerLine int - The maximum number of fields per line, which can be read by /insert/* handlers (default 1000) + The maximum number of log fields per line, which can be read by /insert/* handlers (default 1000) -insert.maxLineSizeBytes size The maximum size of a single line, which can be read by /insert/* handlers Supports the following optional suffixes for size values: KB, MB, GB, TB, KiB, MiB, GiB, TiB (default 262144)