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

Robin Westberg rwestberg at openjdk.java.net
Sun Apr 18 08:18:15 UTC 2021


On Fri, 16 Apr 2021 20:40:45 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:
> 
>   Fix start time stamp

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

> 36: 
> 37: public class BotLogstashHandler extends StreamHandler {
> 38:     private final RestRequest endpoint;

One thing that I realized when thinking about this, is that this change will result in a lot more POSTs. However, RestRequest implements various rate limits to adhere to GitHub policies like https://docs.github.com/en/rest/overview/resources-in-the-rest-api#rate-limiting and https://docs.github.com/en/rest/guides/best-practices-for-integrators#dealing-with-abuse-rate-limits . So it would perhaps be better to just use HttpClient directly in this context.

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

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


More information about the skara-dev mailing list