notify router: log each delivered forge event and each sink outcome
This commit is contained in:
parent
3925534db6
commit
7a964c9c5c
3 changed files with 282 additions and 26 deletions
|
|
@ -218,6 +218,21 @@ so a retry shows twice, and the page says so under the table. A row that
|
|||
takes longer than 2 seconds to write counts as failed: the router logs a
|
||||
warning and the delivery goes on.
|
||||
|
||||
**The journal.** The router also logs each delivery it handles, so
|
||||
`swarm-logs` answers whether a flow ran for a given PR. The lines carry the
|
||||
event and sender, never the payload body:
|
||||
|
||||
| Message | Level | Fields |
|
||||
| -------------------------------------------- | ----- | ----------------------------------------------------------------------------------------- |
|
||||
| `notify router: forge event routed` | info | `event_type`, `action`, `repo`, `number`, `sender`, `delivery_id`, `flows` (at least one) |
|
||||
| `notify router: forge event matched no flow` | debug | the same fields, with `flows` of 0 |
|
||||
| `notify router: sink ran` | info | `flow`, `repo`, `number`, `kind`, `target`, `outcome` |
|
||||
| `notify router: sink failed` | warn | `flow`, `repo`, `number`, `kind`, `target`, `error` |
|
||||
|
||||
`flows` counts the flows that produced a todo op or a review request.
|
||||
`delivery_id` is the forge's delivery id, or `none` when the event carried no
|
||||
id. A review the controller skipped is a `sink ran` line, as in the log rows.
|
||||
|
||||
**The dry run.** The router runs a flows document over the newest 50 events of
|
||||
the `SWARM_EVENTS` stream and returns, for each flow the document turns on,
|
||||
how many of those events reached each node. A `match` node counts the events
|
||||
|
|
|
|||
Loading…
Reference in a new issue