Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions docs/victorialogs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ according to the following docs:

## tip

* BUGFIX: [cluster ingestion](https://docs.victoriametrics.com/victorialogs/cluster/): relax validation for logs received via the internal protocol by accepting rows where stream fields don't match same-named regular log fields. This helps avoid dropping OpenTelemetry logs with resource and log record field name collisions.

## [v1.50.0](https://github.com/VictoriaMetrics/VictoriaLogs/releases/tag/v1.50.0)

Released at 2026-04-14
Expand Down
4 changes: 2 additions & 2 deletions lib/logstorage/log_rows.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ func (lr *LogRows) MustAddInsertRow(r *InsertRow) {

var invalidStreamTagsLogger = logger.WithThrottler("invalid_stream_tags", 5*time.Second)

func verifyStreamTagsCanonical(streamTagsCanonical string, fields []Field) error {
func verifyStreamTagsCanonical(streamTagsCanonical string, _ []Field) error {
st := GetStreamTags()
defer PutStreamTags(st)

Expand All @@ -332,7 +332,7 @@ func verifyStreamTagsCanonical(streamTagsCanonical string, fields []Field) error
if len(tail) > 0 {
return fmt.Errorf("unexpected tail left after unmarshaling streamTagsCanonical; len(tail)=%d; streamTags: %s", len(tail), st)
}
return st.verifyCanonicalFieldValues(fields)
return nil
}

func (lr *LogRows) mustAdd(tenantID TenantID, timestamp int64, fields []Field) {
Expand Down
27 changes: 0 additions & 27 deletions lib/logstorage/log_rows_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -434,35 +434,8 @@ func TestVerifyStreamTagsCanonical_Success(t *testing.T) {
f(`{a="b"}`, `x=y a=b q=w`)
f(`{a="b",c="d"}`, `c=d x=y a=b`)
f(`{a="b"}`, `a=b x=y a=b`)
}

func TestVerifyStreamTagsCanonical_Failure(t *testing.T) {
f := func(streamTags, fieldsStr string) {
t.Helper()

st := GetStreamTags()
if err := st.unmarshalStringInplace(streamTags); err != nil {
t.Fatalf("cannot unmarshal stream tags: %s", err)
}
streamTagsCanonical := st.MarshalCanonical(nil)
PutStreamTags(st)

p := getLogfmtParser()
defer putLogfmtParser(p)
p.parse(fieldsStr)

if err := verifyStreamTagsCanonical(string(streamTagsCanonical), p.fields); err == nil {
t.Fatalf("expecting non-nil error")
}
}

// missing value
f(`{a="b"}`, ``)
f(`{a="b"}`, `x=y`)

// value mismatch
f(`{a="b"}`, `a=c`)

// multiple fields with the same name
f(`{a="b"}`, `a=b x=y a=c`)
}