diff --git a/docs/VictoriaLogs/keyConcepts.md b/docs/VictoriaLogs/keyConcepts.md index c2cacfd08..44d25aa2e 100644 --- a/docs/VictoriaLogs/keyConcepts.md +++ b/docs/VictoriaLogs/keyConcepts.md @@ -17,7 +17,7 @@ aliases: [VictoriaLogs](https://docs.victoriametrics.com/victorialogs/) works with both structured and unstructured logs. Every log entry must contain at least [log message field](#message-field) plus arbitrary number of additional `key=value` fields. -A single log entry can be expressed as a single-level [JSON](https://www.json.org/json-en.html) object with string keys and values. +A single log entry can be expressed as a single-level [JSON](https://www.json.org/json-en.html) object with string keys and string values. For example: ```json @@ -31,6 +31,30 @@ For example: } ``` +Empty values are treated the same as non-existing values. For example, the following log entries are equivalent, +since they have only one identical non-empty field - [`_msg`](#message-field): + +```json +{ + "_msg": "foo bar", + "some_field": "", + "another_field": "" +} +``` + +```json +{ + "_msg": "foo bar", + "third_field": "", +} +``` + +```json +{ + "_msg": "foo bar", +} +``` + VictoriaLogs automatically transforms multi-level JSON (aka nested JSON) into single-level JSON during [data ingestion](https://docs.victoriametrics.com/victorialogs/data-ingestion/) according to the following rules: