| The @PLUGIN@ plugin periodically writes a snapshot of the Gerrit work queue to | |
| a log file, so admins can see what was queued or running while the system was | |
| in a degraded state. | |
| Each snapshot is a point-in-time capture only. Tasks that start and finish | |
| entirely between two snapshots are not recorded. | |
| The log is written to `$site_path/logs/workqueue_log` and is rotated like the | |
| other Gerrit logs. No snapshots are taken until a sampling | |
| [interval](config.md) is configured. | |
| Log format | |
| ---------- | |
| A snapshot emits a summary event carrying the number of tasks, followed by one | |
| event per task present at the instant of the snapshot. | |
| Each event is a single line of space-separated `key=value` pairs, prefixed with | |
| the timestamp at which the snapshot was taken. The `command` value is always | |
| enclosed in single quotes, as it is free-form text that may contain whitespace. | |
| The fields are: | |
| * `snapshotSeq`: monotonically increasing sequence number assigned to each | |
| snapshot since process start. All events from the same snapshot share a | |
| `snapshotSeq`, so use it to correlate and order the events of a single | |
| sample. | |
| * `taskCount`: number of tasks captured by the snapshot. | |
| * `taskId`: unique task identifier on this server. | |
| * `state`: raw task state, one of `DONE`, `CANCELLED`, `STOPPING`, `RUNNING`, | |
| `STARTING`, `PARKED`, `READY`, `SLEEPING`, `OTHER`. | |
| * `queueName`: name of the executor queue the task is scheduled in. | |
| * `startTime`: time at which the task was added to the queue. | |
| * `command`: short text description of the task. |