Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add error.type field #566

Merged
merged 3 commits into from
Sep 24, 2019
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
1 change: 1 addition & 0 deletions CHANGELOG.next.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 3 additions & 0 deletions code/go/ecs/error.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions docs/field-details.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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

// ===============================================================
Expand Down
6 changes: 6 additions & 0 deletions generated/beats/fields.ecs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions generated/csv/fields.csv
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 11 additions & 1 deletion generated/ecs/ecs_flat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
12 changes: 11 additions & 1 deletion generated/ecs/ecs_nested.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 4 additions & 0 deletions generated/elasticsearch/6/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,10 @@
"ignore_above": 1024,
"index": false,
"type": "keyword"
},
"type": {
"ignore_above": 1024,
"type": "keyword"
}
}
},
Expand Down
4 changes: 4 additions & 0 deletions generated/elasticsearch/7/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,10 @@
"ignore_above": 1024,
"index": false,
"type": "keyword"
},
"type": {
"ignore_above": 1024,
"type": "keyword"
}
}
},
Expand Down
4 changes: 4 additions & 0 deletions generated/legacy/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,10 @@
"ignore_above": 1024,
"index": false,
"type": "keyword"
},
"type": {
"ignore_above": 1024,
"type": "keyword"
}
}
},
Expand Down
10 changes: 10 additions & 0 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
7 changes: 7 additions & 0 deletions schemas/error.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@
description: >
Error code describing the error.

- name: type
level: extended
type: keyword
example: java.lang.NullPointerException
description: >
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add an example under example key? Would also be great to have at least 2 examples in the description. The reason I'm insisting on this is that type fields are always these "well we could fit everything in here" and its always hard to explain what is in. Having example should help.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added an example field but could not come up with a good second example for the description

The type of the error, for example the class name of the exception.

- name: stack_trace
level: extended
type: keyword
Expand Down