RFR: SKARA-971: Stop clumping up logs in logstash

Robin Westberg rwestberg at openjdk.java.net
Fri Apr 16 07:01:28 UTC 2021


On Thu, 15 Apr 2021 23:38:17 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()

Looks good, this is probably how it should have been done from the beginning!

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

> 79:             query.put("message", message);
> 80: 
> 81:             for (Map.Entry<String, String> entry : LogContextMap.entrySet()) {

Suggestion:

            for (var entry : LogContextMap.entrySet()) {

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

Marked as reviewed by rwestberg (Reviewer).

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


More information about the skara-dev mailing list