From 4109312403d95053509efcbf8a2377a5b22c53f3 Mon Sep 17 00:00:00 2001 From: Felix Barnsteiner Date: Thu, 19 Sep 2019 11:27:23 +0200 Subject: [PATCH] Add error.stack_trace (#562) --- CHANGELOG.next.md | 1 + code/go/ecs/error.go | 3 +++ docs/field-details.asciidoc | 11 +++++++++++ generated/beats/fields.ecs.yml | 5 +++++ generated/csv/fields.csv | 1 + generated/ecs/ecs_flat.yml | 11 +++++++++++ generated/ecs/ecs_nested.yml | 11 +++++++++++ generated/elasticsearch/6/template.json | 6 ++++++ generated/elasticsearch/7/template.json | 6 ++++++ generated/legacy/template.json | 5 +++++ schema.json | 10 ++++++++++ schemas/error.yml | 8 ++++++++ 12 files changed, 78 insertions(+) diff --git a/CHANGELOG.next.md b/CHANGELOG.next.md index edc5cf66f4..8a732d82ee 100644 --- a/CHANGELOG.next.md +++ b/CHANGELOG.next.md @@ -10,6 +10,7 @@ Thanks, you're awesome :-) --> ### Bugfixes ### Added +* Added `error.stack_trace` field. #562 ### Improvements diff --git a/code/go/ecs/error.go b/code/go/ecs/error.go index 1bd27aedb6..1a6734528a 100644 --- a/code/go/ecs/error.go +++ b/code/go/ecs/error.go @@ -31,4 +31,7 @@ type Error struct { // Error code describing the error. Code string `ecs:"code"` + + // The stack trace of this error in plain text. + StackTrace string `ecs:"stack_trace"` } diff --git a/docs/field-details.asciidoc b/docs/field-details.asciidoc index c9366c1a9b..709abc02f0 100644 --- a/docs/field-details.asciidoc +++ b/docs/field-details.asciidoc @@ -1018,6 +1018,17 @@ type: text // =============================================================== +| error.stack_trace +| The stack trace of this error in plain text. + +type: keyword + + + +| extended + +// =============================================================== + |===== [[ecs-event]] diff --git a/generated/beats/fields.ecs.yml b/generated/beats/fields.ecs.yml index a0656ab401..e7d0f1c6e0 100644 --- a/generated/beats/fields.ecs.yml +++ b/generated/beats/fields.ecs.yml @@ -813,6 +813,11 @@ level: core type: text description: Error message. + - name: stack_trace + level: extended + type: keyword + ignore_above: 1024 + description: The stack trace of this error in plain text. - name: event title: Event group: 2 diff --git a/generated/csv/fields.csv b/generated/csv/fields.csv index 3bce47e736..68b101f670 100644 --- a/generated/csv/fields.csv +++ b/generated/csv/fields.csv @@ -99,6 +99,7 @@ ecs.version,keyword,core,1.0.0,1.2.0-dev error.code,keyword,core,,1.2.0-dev error.id,keyword,core,,1.2.0-dev error.message,text,core,,1.2.0-dev +error.stack_trace,keyword,extended,,1.2.0-dev event.action,keyword,core,user-password-change,1.2.0-dev event.category,keyword,core,user-management,1.2.0-dev event.code,keyword,extended,4648,1.2.0-dev diff --git a/generated/ecs/ecs_flat.yml b/generated/ecs/ecs_flat.yml index 54cf0ca76a..cdcd67dce5 100644 --- a/generated/ecs/ecs_flat.yml +++ b/generated/ecs/ecs_flat.yml @@ -1104,6 +1104,17 @@ error.message: order: 1 short: Error message. type: text +error.stack_trace: + description: The stack trace of this error in plain text. + doc_values: false + flat_name: error.stack_trace + ignore_above: 1024 + index: false + level: extended + name: stack_trace + order: 3 + short: The stack trace of this error in plain text. + type: keyword event.action: description: 'The action captured by the event. diff --git a/generated/ecs/ecs_nested.yml b/generated/ecs/ecs_nested.yml index 24d1686bbe..330e60a21e 100644 --- a/generated/ecs/ecs_nested.yml +++ b/generated/ecs/ecs_nested.yml @@ -1296,6 +1296,17 @@ error: order: 1 short: Error message. type: text + stack_trace: + description: The stack trace of this error in plain text. + doc_values: false + flat_name: error.stack_trace + ignore_above: 1024 + index: false + level: extended + name: stack_trace + order: 3 + short: The stack trace of this error in plain text. + type: keyword group: 2 name: error prefix: error. diff --git a/generated/elasticsearch/6/template.json b/generated/elasticsearch/6/template.json index ebd7821c2f..8f9020a16b 100644 --- a/generated/elasticsearch/6/template.json +++ b/generated/elasticsearch/6/template.json @@ -492,6 +492,12 @@ "message": { "norms": false, "type": "text" + }, + "stack_trace": { + "doc_values": false, + "ignore_above": 1024, + "index": false, + "type": "keyword" } } }, diff --git a/generated/elasticsearch/7/template.json b/generated/elasticsearch/7/template.json index 6ddcb32921..4e870dac6c 100644 --- a/generated/elasticsearch/7/template.json +++ b/generated/elasticsearch/7/template.json @@ -491,6 +491,12 @@ "message": { "norms": false, "type": "text" + }, + "stack_trace": { + "doc_values": false, + "ignore_above": 1024, + "index": false, + "type": "keyword" } } }, diff --git a/generated/legacy/template.json b/generated/legacy/template.json index 0e6cab1b38..1d382fa1ce 100644 --- a/generated/legacy/template.json +++ b/generated/legacy/template.json @@ -313,6 +313,11 @@ "message": { "norms": false, "type": "text" + }, + "stack_trace": { + "ignore_above": 1024, + "index": false, + "type": "keyword" } } }, diff --git a/schema.json b/schema.json index 97863730c7..b09b60d090 100644 --- a/schema.json +++ b/schema.json @@ -722,6 +722,16 @@ "name": "error.message", "required": false, "type": "text" + }, + "error.stack_trace": { + "description": "The stack trace of this error in plain text.", + "example": "", + "footnote": "", + "group": 2, + "level": "extended", + "name": "error.stack_trace", + "required": false, + "type": "(not indexed)" } }, "group": 2, diff --git a/schemas/error.yml b/schemas/error.yml index 65b298b6f4..4fe987ddb1 100644 --- a/schemas/error.yml +++ b/schemas/error.yml @@ -28,3 +28,11 @@ type: keyword description: > Error code describing the error. + + - name: stack_trace + level: extended + type: keyword + index: false + description: > + The stack trace of this error in plain text. +