Event API improvements
- Dominant language
- Java
- Stars
- 14.9k
- Forks
- 3.5k
- Avg merge
- 19h 14m
- Merged PRs (30d)
- 63
Description
* Improvements to `Event.getField`
* [Allow default value `getField(ref, defaultValue)` for returning a default value if a field does not exist in the Event.](https://github.com/elastic/logstash/issues/8304)
* [Make `getField` throw exception if the requested field is missing.](https://github.com/elastic/logstash/issues/8305)
* [Provide typed `get` methods](https://github.com/elastic/logstash/issues/8303)
* Provide scalar -> list coercion on `getAsList`
* [Add Map-like `compute`, `computeIfAbsent`, and `computeIfPresent`.](https://github.com/elastic/logstash/issues/8306)
* Encourage `Event.getField(FieldReference)` (instead of `Event.getField(String)`)
* [Add FieldReference builder API (similar in idea to Java's Paths and Path api)](https://github.com/elastic/logstash/issues/8307)
These were the result of a discussion today that had an opening question of: "Can we improve the Event API by adding typed getters"
Contributor guide
Assessment
This issue has not been assessed yet.