RFR: SKARA-971: Stop clumping up logs in logstash [v2]

Erik Joelsson erikj at openjdk.java.net
Fri Apr 16 19:34:04 UTC 2021


On Fri, 16 Apr 2021 19:31:13 GMT, Erik Joelsson <erikj at openjdk.org> wrote:

>> I would like to change how we send logs to logstash so each log message is stored as an individual document. To make this more practical, we need to add some more meta data to each message so we can properly filter them. I suggest adding the following:
>> 
>> instance_start_time: An ISO_INSTANT time stamp string indicating when this JVM instance was started.
>> work_id: A running counter generated ID for each work item, rest request or periodic check, which was previously clumped up in one log message.
>> work_item: For work items, store the item toString()
>
> Erik Joelsson has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Update bots/cli/src/main/java/org/openjdk/skara/bots/cli/BotLogstashHandler.java
>   
>   Co-authored-by: Robin Westberg <robin at westberg.se>

bots/cli/src/main/java/org/openjdk/skara/bots/cli/BotLogstashHandler.java line 81:

> 79:             query.put("message", message);
> 80: 
> 81:             for (var entry : LogContextMap.entrySet()) {

Right, not used to var yet. I use Intellij's templates to generate loops and the template generates the type for me. I did change it manually in some other location but missed this one.

-------------

PR: https://git.openjdk.java.net/skara/pull/1120


More information about the skara-dev mailing list