forked from elastic/elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
apm: Set log.level: error on all apm error logs
This commit sets `log.level: "error"` as a `constant_keyword` for all apm error logs. Part of elastic/apm-server#13956 Signed-off-by: Marc Lopez Rubio <[email protected]>
- Loading branch information
Showing
3 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
x-pack/plugin/apm-data/src/yamlRestTest/resources/rest-api-spec/test/20_error_logs.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
setup: | ||
- do: | ||
cluster.health: | ||
wait_for_events: languid | ||
|
||
--- | ||
"Test logs-apm.error-* error log fields": | ||
- do: | ||
bulk: | ||
index: logs-apm.error-log-level-testing | ||
refresh: true | ||
body: | ||
# Non-empty error.exception.message used | ||
- create: {} | ||
- '{"@timestamp": "2017-06-22", "error": {"log": {"message": "loglevel"}, "exception": [{"message": "exception_used"}]}}' | ||
|
||
- is_false: errors | ||
|
||
- do: | ||
search: | ||
index: logs-apm.error-log-level-testing | ||
body: | ||
fields: ["log.level"] | ||
- length: { hits.hits: 1 } | ||
- match: { hits.hits.0.fields: {"log.level": ["error"]} } |