Integrated: 1552: Log relevant timer numbers
Erik Joelsson
erikj at openjdk.org
Tue Aug 30 18:18:30 UTC 2022
On Tue, 23 Aug 2022 23:20:26 GMT, Erik Joelsson <erikj at openjdk.org> wrote:
> This is a pretty big patch, but it shouldn't be too scary as it's only supposed to change logging, mainly by adding more logging (and also removing some now redundant log calls).
>
> The main focus here is to add structured timing data to some log messages. To do this, I'm using the optional `parameters` `Object[]` that you can supply to the logger from `java.util.logging`. If the LogstashHandler finds a `Duration` instance in that array, it will add it as a "duration" field in the logstash log document. In the BotRunner, we were already using parameters for a different purpose, so it got a little bit messy, but I think it's ok.
>
> There are two kinds of timings I'm adding logging for. The obvious one is timing external HTTP calls and running processes, as well as total running/pending/scheduled times for WorkItems and getPeriodicItems in the BotRunner. The other kind are more complex as I'm trying to measure the user perceived latency from when a PR or bug is updated to when the bot actually reacts with a response to that update. This is of course tricky to get right and needs to be carefully implemented for each instance, but I believe I have at least added some reasonably relevant approximations that will make sense to measure and track. To generate these, I had to introduce a new field in various WorkItems that stores the timestamp from the external change that triggered it (e.g. `prUpdatedAt`).
>
> In addition to this, there are a ton more regular log messages, mostly on info level, that detail actions performed by various WorkItems. This is something I have been missing a lot when browsing logs.
This pull request has now been integrated.
Changeset: 3b74c3b2
Author: Erik Joelsson <erikj at openjdk.org>
URL: https://git.openjdk.org/skara/commit/3b74c3b2f4c1de7fd30f31c367a52cf6e3ee392f
Stats: 290 lines in 28 files changed: 199 ins; 13 del; 78 mod
1552: Log relevant timer numbers
Reviewed-by: ihse
-------------
PR: https://git.openjdk.org/skara/pull/1361
More information about the skara-dev
mailing list