How big the app's data is, and a webhook delivery log with Send again
Settings -> Data -> Storage measures the database, backups and sessions and every table (size, rows, growth, how long it is kept, how far back it reaches), and flags histories that are not being trimmed or have no limit. Event webhooks now keep a delivery log (last 100 per webhook, 14 days): what was sent, how it went, the message itself, and Send again, which resends it exactly as it was (same id and signature). Resends are audited and in the Change log. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
aebf3c6ce1
commit
e114567d64
22 files changed
+6833
-19
No files matched your search
+22
-2
@@ -149,13 +149,33 @@ have handled and refuse repeats, and reject a `createdAt` that is far from your
|
||||
### Delivery: what to rely on and what not to
|
||||
|
||||
- Delivery is **best-effort and never holds anything up.** One try; if it does not get a `2xx` answer, **one more after two seconds** (the same message, the same `id` and `X-HLM-Delivery`); then the
|
||||
result is written on the webhook and forgotten.
|
||||
result is written on the webhook and in its [delivery log](#the-delivery-log-and-sending-again).
|
||||
- A request is given **five seconds**. **Redirects are not followed** (a redirect counts as a failure) — give the final address.
|
||||
- **There is no queue and no replay.** A receiver that is down for longer than those two tries **misses the event**. Messages for different events can arrive in any order. If you need to be certain, treat the
|
||||
- **There is no queue and no automatic replay.** A receiver that is down for longer than those two tries **misses the event** — until someone sends it again from the delivery log. Messages for different events can arrive in any order. If you need to be certain, treat the
|
||||
webhook as a *nudge* and reconcile with the [read API](API.md) (`GET /api/v1/alerts`, `/api/v1/maintenance`), which always says what is true now.
|
||||
- Because a retry reuses the delivery id, **handle each id once** (idempotently).
|
||||
- Answer quickly (`200` is enough) and do slow work afterwards.
|
||||
|
||||
### The delivery log and sending again
|
||||
|
||||
Every message sent to a webhook is written down: when, which event, whether it got through, what came back (`200`, or what went wrong, such as `connect ECONNREFUSED` or `500`), whether it needed its second try, and the
|
||||
message itself. **Settings → API and webhooks → Event webhooks → Sent** opens the log for one webhook, newest first, and **Show the message** unfolds the JSON that was sent.
|
||||
|
||||
**Send again** sends a message from the log **exactly as it was** — the same bytes, the same `id` and `X-HLM-Delivery`, a signature made over the same body — so a receiver that already handled it can recognise it by its id and
|
||||
ignore it, and one that missed it handles it now. The new attempt is logged as a delivery of its own, marked *sent again by hand*, and updates the webhook's *Last* result. Like the first send it is tried twice.
|
||||
It is for when the receiver was down or the fault was at its end; it does not repair a wrong address.
|
||||
|
||||
- **The last 100 per webhook, and none older than 14 days,** are kept. Removing a webhook removes its log.
|
||||
- A message larger than **16 000 characters** is not kept in full, so it is not shown and cannot be sent again (`409 too_large`). The messages the app sends are far smaller.
|
||||
- **Administrators only** — the log holds what was sent, which names servers and says what is wrong with them. Each resend is in the audit log (*webhook › retry*) and in the **Change log**.
|
||||
|
||||
```
|
||||
GET /api/event-webhooks/<id>/deliveries?limit=50 the log (limit 1–100)
|
||||
POST /api/event-webhooks/<id>/deliveries/<delivery row id>/retry send one again → { "ok": true, "result": "200" }
|
||||
```
|
||||
|
||||
These are the app's own addresses (they need an administrator's sign-in, not an API token), listed for completeness.
|
||||
|
||||
### Alert keys
|
||||
|
||||
`alert.key` is the stable identity of a problem: the same problem has the same key every time, so you can match an `opened` with its `resolved`. The shapes:
|
||||
|
||||
Reference in new issue
Block a user