Skip to content
Merged
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
9 changes: 9 additions & 0 deletions app/vlinsert/opentelemetry/opentelemetry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,12 @@ func TestPushProtobufRequest(t *testing.T) {
timestampsExpected = []int64{1234}
resultsExpected = `{"_msg":"[\"Zm9vIGJhcg==\"]","severity":"Unspecified"}`
f(data, timestampsExpected, resultsExpected)

// decode null in ArrayValue
data = `[{"scopeLogs":[{"logRecords":[{"timeUnixNano":1234,"body":{"arrayValue":{"values":[null,{}]}}}]}]}]`
timestampsExpected = []int64{1234}
resultsExpected = `{"_msg":"[null,null]","severity":"Unspecified"}`
f(data, timestampsExpected, resultsExpected)
}

var mp easyproto.MarshalerPool
Expand Down Expand Up @@ -430,6 +436,9 @@ type anyValue struct {
}

func (av *anyValue) marshalProtobuf(mm *easyproto.MessageMarshaler) {
if av == nil {
return
}
switch {
case av.StringValue != nil:
mm.AppendString(1, *av.StringValue)
Expand Down
2 changes: 1 addition & 1 deletion app/vlinsert/opentelemetry/pb_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func decodeAnyValueToJSON(src []byte, a *fastjson.Arena, fb *fmtBuffer) (*fastjs
return a.NewString(v), nil
}
}
return nil, nil
return a.NewNull(), nil
}

func decodeKeyValueListToJSON(src []byte, a *fastjson.Arena, fb *fmtBuffer) (*fastjson.Value, error) {
Expand Down
2 changes: 2 additions & 0 deletions docs/victorialogs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ according to the follosing docs:

* FEATURE: [OpenTelemetry data ingestion](https://docs.victoriametrics.com/victorialogs/data-ingestion/opentelemetry/): parse [`scope` inside ScopeLogs](https://github.com/open-telemetry/opentelemetry-proto/blob/a5f0eac5b802f7ae51dfe41e5116fe5548955e64/opentelemetry/proto/logs/v1/logs.proto#L72) and store it into [log fields](https://docs.victoriametrics.com/victorialogs/keyconcepts/#data-model) starting with `scope.` prefix. See [#826](https://github.com/VictoriaMetrics/VictoriaLogs/issues/826).

* BUGFIX: [OpenTelemetry data ingestion](https://docs.victoriametrics.com/victorialogs/data-ingestion/opentelemetry/): properly handle `null` values inside arrays. Previously, such arrays could cause a panic during ingestion. See [#869](https://github.com/VictoriaMetrics/VictoriaLogs/issues/869#issuecomment-3627177567).

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

Released at 2025-12-05
Expand Down