From 43cd01509c219ddf5a2914c18ac5307ad5946c97 Mon Sep 17 00:00:00 2001 From: Mathieu Martin Date: Wed, 11 Mar 2020 13:55:09 -0400 Subject: [PATCH 1/2] Quote the `labels` example, to avoid the YAML interpreter interpret it. --- docs/field-details.asciidoc | 2 +- generated/beats/fields.ecs.yml | 4 +--- generated/csv/fields.csv | 2 +- generated/ecs/ecs_flat.yml | 4 +--- generated/ecs/ecs_nested.yml | 4 +--- schemas/base.yml | 2 +- 6 files changed, 6 insertions(+), 12 deletions(-) diff --git a/docs/field-details.asciidoc b/docs/field-details.asciidoc index 3e0607d40a..3ed3ef7c77 100644 --- a/docs/field-details.asciidoc +++ b/docs/field-details.asciidoc @@ -42,7 +42,7 @@ type: object -example: `{'application': 'foo-bar', 'env': 'production'}` +example: `{"application": "foo-bar", "env": "production"}` | core diff --git a/generated/beats/fields.ecs.yml b/generated/beats/fields.ecs.yml index c35035f09d..6a3493ecc7 100644 --- a/generated/beats/fields.ecs.yml +++ b/generated/beats/fields.ecs.yml @@ -30,9 +30,7 @@ All values are stored as keyword. Example: `docker` and `k8s` labels.' - example: - application: foo-bar - env: production + example: '{"application": "foo-bar", "env": "production"}' - name: message level: core type: text diff --git a/generated/csv/fields.csv b/generated/csv/fields.csv index fe583485db..2efa35e20b 100644 --- a/generated/csv/fields.csv +++ b/generated/csv/fields.csv @@ -1,6 +1,6 @@ ECS_Version,Indexed,Field_Set,Field,Type,Level,Normalization,Example,Description 1.6.0-dev,true,base,@timestamp,date,core,,2016-05-23T08:05:34.853Z,Date/time when the event originated. -1.6.0-dev,true,base,labels,object,core,,"{'application': 'foo-bar', 'env': 'production'}",Custom key/value pairs. +1.6.0-dev,true,base,labels,object,core,,"{""application"": ""foo-bar"", ""env"": ""production""}",Custom key/value pairs. 1.6.0-dev,true,base,message,text,core,,Hello World,Log message optimized for viewing in a log viewer. 1.6.0-dev,true,base,tags,keyword,core,array,"[""production"", ""env2""]",List of keywords used to tag each event. 1.6.0-dev,true,agent,agent.ephemeral_id,keyword,extended,,8a4f500f,Ephemeral identifier of this agent. diff --git a/generated/ecs/ecs_flat.yml b/generated/ecs/ecs_flat.yml index cf432005df..b8e45a422d 100644 --- a/generated/ecs/ecs_flat.yml +++ b/generated/ecs/ecs_flat.yml @@ -3829,9 +3829,7 @@ labels: All values are stored as keyword. Example: `docker` and `k8s` labels.' - example: - application: foo-bar - env: production + example: '{"application": "foo-bar", "env": "production"}' flat_name: labels level: core name: labels diff --git a/generated/ecs/ecs_nested.yml b/generated/ecs/ecs_nested.yml index b30d923001..3da4f377fe 100644 --- a/generated/ecs/ecs_nested.yml +++ b/generated/ecs/ecs_nested.yml @@ -172,9 +172,7 @@ base: All values are stored as keyword. Example: `docker` and `k8s` labels.' - example: - application: foo-bar - env: production + example: '{"application": "foo-bar", "env": "production"}' flat_name: labels level: core name: labels diff --git a/schemas/base.yml b/schemas/base.yml index 4029791998..99e301cfe8 100644 --- a/schemas/base.yml +++ b/schemas/base.yml @@ -39,7 +39,7 @@ level: core type: object object_type: keyword - example: {application: foo-bar, env: production} + example: "{\"application\": \"foo-bar\", \"env\": \"production\"}" short: Custom key/value pairs. description: > Custom key/value pairs. From 0b321a9241d062526824d2d62cf2d69c23eec695 Mon Sep 17 00:00:00 2001 From: Mathieu Martin Date: Wed, 11 Mar 2020 14:01:03 -0400 Subject: [PATCH 2/2] Changelog --- CHANGELOG.next.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.next.md b/CHANGELOG.next.md index e27747606a..83af9a3cda 100644 --- a/CHANGELOG.next.md +++ b/CHANGELOG.next.md @@ -27,6 +27,9 @@ Thanks, you're awesome :-) --> #### Bugfixes +* Quoted the example for `labels` to avoid YAML interpreting it, and having + slightly different results in different situations. #782 + #### Added #### Improvements