Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
d54f03a
app/vlinsert/insertutil: optimize LogMessageProcessor
vadimalekseev Jan 17, 2026
ec020c6
Apply suggestion from @valyala
valyala Feb 5, 2026
e040363
.github: update GitHub Copilot instructions to avoid nitpicking
func25 Jan 21, 2026
8f757a6
.github: update GitHub Copilot instructions to avoid verbosity
func25 Jan 21, 2026
0b44f2c
lib/logstorage: fix options(time_offset) for day_range and week_range…
func25 Jan 21, 2026
4ebf61e
docs: replace old grafana datasource page with links to a new one (#987)
AndrewChubatiuk Jan 21, 2026
81b490d
docs: improve documentation accuracy (#1024)
func25 Jan 22, 2026
a3b36cf
add docs-update-flags and sync flags docs with VictoriaMetrics conven…
func25 Jan 23, 2026
47a1a80
LICENSE: update the end copyright year from 2025 to 2026
valyala Jan 25, 2026
aa598ca
lib/logstorage: add getPartitions() and putPartitions() helpers to St…
valyala Jan 26, 2026
d3df911
app/vlstorage: allow creating snapshots for multiple per-day partitio…
valyala Jan 26, 2026
45a430a
app/vlstorage: add `-snapshotMaxAge` command-line flag for automatic …
valyala Jan 26, 2026
6a9d789
docs/victorialogs/README.md: typo fix after the commit 992ff2e5c3c84f…
valyala Jan 26, 2026
ffa9553
docs/victorialogs: return back missing aliases, which were dropped in…
valyala Jan 26, 2026
00bcf2b
all: consistently use sync.WaitGroup.Go() instead of sync.WaitGroup.A…
valyala Jan 26, 2026
bd78f49
vendor: update github.com/VictoriaMetrics/VictoriaMetrics from v1.134…
valyala Jan 27, 2026
57161e4
lib/logstorage: optimize JSONParser.parseLogMessage a bit
valyala Jan 27, 2026
46e3091
app/vlagent/kubernetescollector: add an ability to change default _st…
vadimalekseev Jan 27, 2026
729e694
lib/logstorage: use string slice for LogRows.streamFields instead of …
valyala Jan 27, 2026
1451315
app/vlagent/kubernetescollector: add file hashing to prevent inode co…
vadimalekseev Jan 27, 2026
272f9b0
app/vlagent/kubernetescollector: fix Kubernetes system logs timestamp…
vadimalekseev Jan 27, 2026
c00d043
app/vlagent/kubernetescollector: add support for dynamic token and ce…
vadimalekseev Jan 27, 2026
12282a0
app/vlagent/kubernetescollector/logfile.go: remove superflouos import…
valyala Jan 27, 2026
3a174f6
app/vmui: add pipe titles with links to docs in autocomplete popup (#…
Loori-R Jan 27, 2026
a8ca089
app/vmui: add a cumulative view option to hits bar chart (#1028)
Loori-R Jan 27, 2026
3530665
app/vmui: add bar count dropdown for hit charts (#1033)
Loori-R Jan 27, 2026
20c79b9
app/vlselect/vmui: run `make vmui-update` after the commit 37a153d8d8…
valyala Jan 27, 2026
67864dc
docs,CHANGELOG: fix snapshot creation change correctness
func25 Jan 27, 2026
c78b94d
app/vlinsert: add an ability to preserve values for the given set of …
valyala Jan 27, 2026
8ee87c5
docs/victorialogs/CHANGELOG.md: refer to the issue related to the pre…
valyala Jan 27, 2026
c8b65ea
logstorage: avoid deadlock on panic while merging (#1022)
func25 Jan 27, 2026
56aee51
lib/logstorage/datadb.go: add a comment explaining why the strange co…
valyala Jan 27, 2026
9332c57
app/vlinsert: fix typo
func25 Jan 27, 2026
0ecd5bd
app/vlselect: accept `step` query arg at /select/logsql/hits and /sel…
valyala Jan 27, 2026
afff7b7
app/vlselect/logsql: properly align `start` and `end` query args at `…
valyala Jan 27, 2026
af10b51
app/vmui: fix: removed per-item mouseleave reset bug (#973)
withlin Jan 27, 2026
a3dc314
logsql/math: prevent panic in math modulo by zero (#1018)
func25 Jan 27, 2026
901b5d7
update GitHub Actions for vmui workflows: optimize caching and depend…
arturminchukov Jan 27, 2026
2f5fa6f
logsql: fix panic when filtering by "_stream" field (#979)
withlin Jan 27, 2026
8862acc
app/vlagent/kubernetescollector: fix 'cannot set offset' panic in a b…
vadimalekseev Jan 27, 2026
38cb686
lib/logstorage: follow-up for the commit 2d0f1e8f4a44f28d0f909d4978ba…
valyala Jan 27, 2026
6b2c8f3
lib/logstorage: properly parse quoted _time, _stream_id and _stream n…
valyala Jan 27, 2026
42b4576
vlinsert: skip empty items in comma-separated ingestion params (#971)
func25 Jan 27, 2026
97951fc
app/vlinsert/insertutil: follow-up for the commit 4ab0c5a2311940a7dae…
valyala Jan 27, 2026
8e29214
app/vlinsert/journald: add journald remote_ip field (#964)
NaturalSpottingSmite Jan 27, 2026
c2160d7
app/vlinsert/journald: follow-up for the commit f7159b6e3bffd1cedbd81…
valyala Jan 27, 2026
a6f45db
app/vlselect/vmui: run `make vmui-update` after the commit df8b6804ac…
valyala Jan 27, 2026
169b929
docs/victorialogs/CHANGELOG.md: cut v1.44.0 release
valyala Jan 27, 2026
b8935ae
deployment: update VictoriaLogs Docker image tag from v1.43.1 to v1.44.0
valyala Jan 27, 2026
447efab
app/vlselect/logsql: properly apply time `offset` when calculating ti…
valyala Jan 28, 2026
a2b0367
app/vlselect/logsql: consistently use parseDuration() function for pa…
valyala Jan 28, 2026
35a8016
app/vlselect/logsql: add support for `offset` http query arg at `/sel…
valyala Jan 28, 2026
149e3d0
app/vlselect/logsql: deny skipping `step` arg at /select/logsql/hits …
valyala Jan 28, 2026
0a7fcc3
docs: use canonical links (#1038)
makasim Jan 29, 2026
d818b1a
dashboards: improve cluster/single-node dashboards (#933)
func25 Jan 29, 2026
1abcc63
fix
func25 Feb 2, 2026
15a6231
dashboards/single-node: show ingestion rate for vlagent using /intern…
func25 Feb 2, 2026
1a7fc3f
dashboards/single-node: accounts for internal traffic in the request …
func25 Feb 3, 2026
9ede00f
app/vmui: fix cumulative bar chart by carrying over previous value fo…
Loori-R Feb 3, 2026
0f19e61
app/vmui: fix rendering of the first bar overlapping the start of the…
Loori-R Feb 3, 2026
dc15b0b
app/vmui: add `offset` parameter to align bar chart data with the use…
Loori-R Feb 3, 2026
3a6d86c
docs/vmalert: show how to attach sample log row via annotations (#1050)
func25 Feb 4, 2026
09f4a46
log/logstorage/ipv6: Support ipv6_range for VictoriaLogs (#1049)
caicancai Feb 4, 2026
81daf4c
docs: fix some broken links (#1069)
hagen1778 Feb 4, 2026
2ce741d
CHANGELOG.md: update ipv6 changelog
func25 Feb 4, 2026
d7ddaad
lib/logstorage: properly apply offset to `stats by (_time:... offset …
valyala Feb 4, 2026
e4f89e6
lib/logstorage: follow-up for the commit 84b11bb949c38d9afdd435de795b…
valyala Feb 4, 2026
7382d3c
app/vmui: fix redundant `/select/logsql/query_time_range` requests (#…
Loori-R Feb 4, 2026
f7bc95a
app/vmui: fix query expression reset when hiding hits chart (#1064)
Loori-R Feb 4, 2026
7c391a1
app/vmui: improve responsive layout and styles (#1043)
Loori-R Feb 4, 2026
bab2a61
app/vmui: fix autocomplete insertion to prevent text overwrite and pr…
Loori-R Feb 4, 2026
1d02c5e
lib/logstorage: properly match ipv4-encoded log fields against ipv6_r…
valyala Feb 4, 2026
c7d42de
go.mod: update github.com/VictoriaMetrics/VictoriaMetrics from v1.134…
valyala Feb 4, 2026
da6d405
app/vmui: rm TESTCASES.md as unused (#1068)
hagen1778 Feb 5, 2026
a00973e
app/vmui: update suggestion for development mode (#1072)
hagen1778 Feb 5, 2026
94614c3
app/vmui: add shortcut for line comment toggle (#1040)
Loori-R Feb 5, 2026
04b2f52
dashboards: add source code data link to internal logging panel (#1074)
makasim Feb 5, 2026
9e94a8f
app/vlinsert/loki: parse JSON message with trailing whitespace/newlin…
func25 Feb 5, 2026
d2fcbf7
app/vlinsert/loki: simplify the code a bit after the commit 0dd2ab9a2…
valyala Feb 5, 2026
4564fcc
deployment/docker: update Go builder from Go1.25.6 to Go1.25.7
valyala Feb 5, 2026
ee4e544
deployment/docker: update base Alpine Docker image from 3.23.2 to 3.23.3
valyala Feb 5, 2026
c526fad
lib/logstorage: prevent from out of memory error when adding millions…
valyala Feb 5, 2026
c8c1a17
wip
valyala Feb 5, 2026
dd6c894
wip
valyala Feb 5, 2026
aaa4cb1
Merge branch 'public-victorialogs' into lmp-atomics
valyala Feb 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 21 additions & 10 deletions app/vlinsert/insertutil/common_params.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,9 @@ type logMessageProcessor struct {
rowsIngestedTotal *metrics.Counter
bytesIngestedTotal *metrics.Counter
flushDuration *metrics.Summary

unflushedRows int
unflushedBytes int
}

func (lmp *logMessageProcessor) initPeriodicFlush() {
Expand Down Expand Up @@ -249,9 +252,12 @@ func (lmp *logMessageProcessor) initPeriodicFlush() {
// If streamFieldsLen >= 0, then the given number of the initial fields is used as log stream fields
// instead of the pre-configured stream fields.
func (lmp *logMessageProcessor) AddRow(timestamp int64, fields []logstorage.Field, streamFieldsLen int) {
lmp.rowsIngestedTotal.Inc()
lmp.mu.Lock()
defer lmp.mu.Unlock()

lmp.unflushedRows++
n := logstorage.EstimatedJSONRowLen(fields)
lmp.bytesIngestedTotal.Add(n)
lmp.unflushedBytes += n

if len(fields) > *MaxFieldsPerLine {
line := logstorage.MarshalFieldsToJSON(nil, fields)
Expand All @@ -260,9 +266,6 @@ func (lmp *logMessageProcessor) AddRow(timestamp int64, fields []logstorage.Fiel
return
}

lmp.mu.Lock()
defer lmp.mu.Unlock()

lmp.lr.MustAdd(lmp.cp.TenantID, timestamp, fields, streamFieldsLen)

if lmp.cp.Debug {
Expand All @@ -285,9 +288,12 @@ type InsertRowProcessor interface {

// AddInsertRow adds r to lmp.
func (lmp *logMessageProcessor) AddInsertRow(r *logstorage.InsertRow) {
lmp.rowsIngestedTotal.Inc()
lmp.mu.Lock()
defer lmp.mu.Unlock()

lmp.unflushedRows++
n := logstorage.EstimatedJSONRowLen(r.Fields)
lmp.bytesIngestedTotal.Add(n)
lmp.unflushedBytes += n

if len(r.Fields) > *MaxFieldsPerLine {
line := logstorage.MarshalFieldsToJSON(nil, r.Fields)
Expand All @@ -296,9 +302,6 @@ func (lmp *logMessageProcessor) AddInsertRow(r *logstorage.InsertRow) {
return
}

lmp.mu.Lock()
defer lmp.mu.Unlock()

lmp.lr.MustAddInsertRow(r)

if lmp.cp.Debug {
Expand All @@ -319,7 +322,13 @@ func (lmp *logMessageProcessor) flushLocked() {
lmp.lastFlushTime = start
logRowsStorage.MustAddRows(lmp.lr)
lmp.lr.ResetKeepSettings()

lmp.flushDuration.UpdateDuration(start)
lmp.rowsIngestedTotal.Add(lmp.unflushedRows)
lmp.bytesIngestedTotal.Add(lmp.unflushedBytes)

lmp.unflushedRows = 0
lmp.unflushedBytes = 0
}

// MustClose flushes the remaining data to the underlying storage and closes lmp.
Expand All @@ -338,9 +347,11 @@ func (lmp *logMessageProcessor) MustClose() {
// MustClose() must be called on the returned LogMessageProcessor when it is no longer needed.
func (cp *CommonParams) NewLogMessageProcessor(protocolName string, isStreamMode bool) LogMessageProcessor {
lr := logstorage.GetLogRows(cp.StreamFields, cp.IgnoreFields, cp.DecolorizeFields, cp.ExtraFields, *defaultMsgValue)

rowsIngestedTotal := metrics.GetOrCreateCounter(fmt.Sprintf("vl_rows_ingested_total{type=%q}", protocolName))
bytesIngestedTotal := metrics.GetOrCreateCounter(fmt.Sprintf("vl_bytes_ingested_total{type=%q}", protocolName))
flushDuration := metrics.GetOrCreateSummary(fmt.Sprintf("vl_insert_flush_duration_seconds{type=%q}", protocolName))

lmp := &logMessageProcessor{
cp: cp,
lr: lr,
Expand Down
66 changes: 66 additions & 0 deletions app/vlinsert/insertutil/common_params_timing_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
package insertutil

import (
"net/http"
"testing"

"github.com/VictoriaMetrics/VictoriaMetrics/lib/fasttime"

"github.com/VictoriaMetrics/VictoriaLogs/lib/logstorage"
)

func BenchmarkAddRow(b *testing.B) {
r, err := http.NewRequest(http.MethodPost, "https://foo.bar/baz?_stream_fields=kubernetes.pod_name,kubernetes.pod_labels.app", nil)
if err != nil {
b.Fatal(err)
}
cp, err := GetCommonParams(r)
if err != nil {
b.Fatal(err)
}

SetLogRowsStorage(benchmarkStorage{})

ts := int64(fasttime.UnixTimestamp()) * 1e9
rows := [][]logstorage.Field{
{
{Name: "kubernetes.pod_name", Value: "victoria-logs-single-0"},
{Name: "kubernetes.pod_labels.app", Value: "VictoriaLogs"},
{Name: "kubernetes.container_name", Value: "oauth2-proxy"},
{Name: "_msg", Value: `GET - "/ready" HTTP/1.1 "kube-probe/1.34" 200 2 0.000`},
},
{
{Name: "kubernetes.pod_name", Value: "victoria-logs-single-0"},
{Name: "kubernetes.pod_labels.app", Value: "VictoriaLogs"},
{Name: "kubernetes.container_name", Value: "oauth2-proxy"},
{Name: "_msg", Value: `GET - "/ready" HTTP/1.1 "GoogleHC/1.0" 200 2 0.000`},
},
}

var n int
for _, row := range rows {
n += logstorage.EstimatedJSONRowLen(row)
}

b.SetBytes(int64(n))
b.ReportAllocs()
b.RunParallel(func(pb *testing.PB) {
lmp := cp.NewLogMessageProcessor("test", false)
defer lmp.MustClose()

for pb.Next() {
for _, row := range rows {
lmp.AddRow(ts, row, -1)
}
}
})
}

type benchmarkStorage struct{}

func (benchmarkStorage) MustAddRows(*logstorage.LogRows) {
}

func (benchmarkStorage) CanWriteData() error {
return nil
}
1 change: 1 addition & 0 deletions docs/victorialogs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ Released at 2026-01-27
* FEATURE: [data ingestion](https://docs.victoriametrics.com/victorialogs/data-ingestion/): add an ability to avoid [flattening](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model) of JSON values for the given keys enumerated via `preserve_json_keys` query arg or via `VL-Preserve-JSON-Keys` http request header. This may be useful if the input JSON-encoded logs contain high-cardinality key names such as `sku-*` in the `{"items":{"sku-1":{...},...,"sku-N":{...}}}`. Then `preserve_json_keys=items` would preserve the `items` field value as is, e.g. it will be equal to the string `{"sku-1":{...},...,"sku-N":{...}}`. See more details about these options at [these docs](https://docs.victoriametrics.com/victorialogs/data-ingestion/#http-parameters) and at [#1002](https://github.com/VictoriaMetrics/VictoriaLogs/issues/1002).
* FEATURE: [dashboards/internal](https://grafana.com/grafana/dashboards/24585): add Grafana dashboard for monitoring VictoriaLogs internal state. The source of the dashboard is available [here](https://github.com/VictoriaMetrics/VictoriaLogs/blob/master/dashboards/victorialogs-internal.json).
* FEATURE: [LogsQL](https://docs.victoriametrics.com/victorialogs/logsql/): add `pattern_match_prefix()` and `pattern_match_suffx()` filters for matching the given pattern at the beginning or at the end of the log field value. See [these docs](https://docs.victoriametrics.com/victorialogs/logsql/#pattern-match-filter) and [#762](https://github.com/VictoriaMetrics/VictoriaLogs/issues/762).
* FEATURE: [data ingestion](https://docs.victoriametrics.com/victorialogs/data-ingestion/): improve scalability for the data ingestion performance on systems with many CPU cores. See [#1021](https://github.com/VictoriaMetrics/VictoriaLogs/pull/1021).
* FEATURE: [Kubernetes Collector](https://docs.victoriametrics.com/victorialogs/vlagent/#collect-kubernetes-pod-logs): add an ability to change default [`_stream`](https://docs.victoriametrics.com/victorialogs/keyconcepts/#stream-fields) fields via `-kubernetesCollector.streamFields` command-line flag. See [#998](https://github.com/VictoriaMetrics/VictoriaLogs/issues/998).
* FEATURE: [querying HTTP API](https://docs.victoriametrics.com/victorialogs/querying/#http-api): accept `step` arg with nanosecond precision at [`/select/logsql/hits`](https://docs.victoriametrics.com/victorialogs/querying/#querying-hits-stats) and [`/select/logsql/stats_query_range`](https://docs.victoriametrics.com/victorialogs/querying/#querying-log-range-stats) endpoints. Previously these endpoints were accepting the `step` query arg only with millisecond precision.
* FEATURE: [web UI](https://docs.victoriametrics.com/victorialogs/querying/#web-ui): add pipe titles with links to [docs.victoriametrics.com](https://docs.victoriametrics.com/victorialogs/logsql/) in autocomplete popup.
Expand Down
Loading