diff --git a/CHANGELOG.next.md b/CHANGELOG.next.md index c34747f5d2..f7d7b1083c 100644 --- a/CHANGELOG.next.md +++ b/CHANGELOG.next.md @@ -12,6 +12,7 @@ Thanks, you're awesome :-) --> ### Added * Added `error.stack_trace` field. #562 * Added `log.origin.file.name`, `log.origin.function` and `log.origin.file.line` fields. #563 +* Added `error.type` field. #566 ### Improvements diff --git a/code/go/ecs/error.go b/code/go/ecs/error.go index 1a6734528a..0fea2b4584 100644 --- a/code/go/ecs/error.go +++ b/code/go/ecs/error.go @@ -32,6 +32,9 @@ type Error struct { // Error code describing the error. Code string `ecs:"code"` + // The type of the error, for example the class name of the exception. + Type string `ecs:"type"` + // 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 66a3bfeacc..50a11111a6 100644 --- a/docs/field-details.asciidoc +++ b/docs/field-details.asciidoc @@ -1025,6 +1025,17 @@ type: keyword +| extended + +// =============================================================== + +| error.type +| The type of the error, for example the class name of the exception. + +type: keyword + +example: `java.lang.NullPointerException` + | extended // =============================================================== diff --git a/generated/beats/fields.ecs.yml b/generated/beats/fields.ecs.yml index 8cc1eee950..5be182dffa 100644 --- a/generated/beats/fields.ecs.yml +++ b/generated/beats/fields.ecs.yml @@ -818,6 +818,12 @@ type: keyword ignore_above: 1024 description: The stack trace of this error in plain text. + - name: type + level: extended + type: keyword + ignore_above: 1024 + description: The type of the error, for example the class name of the exception. + example: java.lang.NullPointerException - name: event title: Event group: 2 diff --git a/generated/csv/fields.csv b/generated/csv/fields.csv index d93f31515a..ae4cd733b5 100644 --- a/generated/csv/fields.csv +++ b/generated/csv/fields.csv @@ -100,6 +100,7 @@ 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 +error.type,keyword,extended,java.lang.NullPointerException,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 8117e86219..dc8c13b1b1 100644 --- a/generated/ecs/ecs_flat.yml +++ b/generated/ecs/ecs_flat.yml @@ -1112,9 +1112,19 @@ error.stack_trace: index: false level: extended name: stack_trace - order: 3 + order: 4 short: The stack trace of this error in plain text. type: keyword +error.type: + description: The type of the error, for example the class name of the exception. + example: java.lang.NullPointerException + flat_name: error.type + ignore_above: 1024 + level: extended + name: type + order: 3 + short: The type of the error, for example the class name of the exception. + 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 f5993c1a85..a6e03cfd90 100644 --- a/generated/ecs/ecs_nested.yml +++ b/generated/ecs/ecs_nested.yml @@ -1304,9 +1304,19 @@ error: index: false level: extended name: stack_trace - order: 3 + order: 4 short: The stack trace of this error in plain text. type: keyword + type: + description: The type of the error, for example the class name of the exception. + example: java.lang.NullPointerException + flat_name: error.type + ignore_above: 1024 + level: extended + name: type + order: 3 + short: The type of the error, for example the class name of the exception. + type: keyword group: 2 name: error prefix: error. diff --git a/generated/elasticsearch/6/template.json b/generated/elasticsearch/6/template.json index a8209ef9b7..88506c40a1 100644 --- a/generated/elasticsearch/6/template.json +++ b/generated/elasticsearch/6/template.json @@ -498,6 +498,10 @@ "ignore_above": 1024, "index": false, "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" } } }, diff --git a/generated/elasticsearch/7/template.json b/generated/elasticsearch/7/template.json index 6994831602..b8216aeca2 100644 --- a/generated/elasticsearch/7/template.json +++ b/generated/elasticsearch/7/template.json @@ -497,6 +497,10 @@ "ignore_above": 1024, "index": false, "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" } } }, diff --git a/generated/legacy/template.json b/generated/legacy/template.json index 8cbd414b2b..5ab3023e5f 100644 --- a/generated/legacy/template.json +++ b/generated/legacy/template.json @@ -318,6 +318,10 @@ "ignore_above": 1024, "index": false, "type": "keyword" + }, + "type": { + "ignore_above": 1024, + "type": "keyword" } } }, diff --git a/schema.json b/schema.json index 08b353bb32..b289c02b93 100644 --- a/schema.json +++ b/schema.json @@ -732,6 +732,16 @@ "name": "error.stack_trace", "required": false, "type": "(not indexed)" + }, + "error.type": { + "description": "The type of the error, for example the class name of the exception.", + "example": "java.lang.NullPointerException", + "footnote": "", + "group": 2, + "level": "extended", + "name": "error.type", + "required": false, + "type": "keyword" } }, "group": 2, diff --git a/schemas/error.yml b/schemas/error.yml index 4fe987ddb1..51a2712370 100644 --- a/schemas/error.yml +++ b/schemas/error.yml @@ -29,6 +29,13 @@ description: > Error code describing the error. + - name: type + level: extended + type: keyword + example: java.lang.NullPointerException + description: > + The type of the error, for example the class name of the exception. + - name: stack_trace level: extended type: keyword