Initial implementation of the queue-logger plugin
Periodically log a snapshot of the Gerrit work queue to
$site_path/logs/workqueue_log, so admins can look back at what was
queued or running while the system was in a degraded state.Tasks that
start and finish entirely between two snapshots are not recorded.
A snapshot emits a summary event carrying the task count, followed by
one event per task. All events of a snapshot share a timestamp and a
snapshotSeq, so they can be correlated and ordered when post-processing
the log. snapshotSeq restarts at 1 every time the plugin is loaded.
Snapshots are disabled by default and are enabled by setting an
interval in $site_path/etc/queue-logger.config:
[workQueueSnapshot]
interval = 30m
Change-Id: I4c90395b5cc62912915cfa9c5876e5ba66b8f7c6
10 files changed