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
@@ -1294,3 +1294,25 @@ export const alertSnoozes = sqliteTable(
|
||||
},
|
||||
(t) => [uniqueIndex("alert_snoozes_alert_idx").on(t.alertId)],
|
||||
);
|
||||
|
||||
// ─── What each event webhook was sent, and how it went ──────────────────────
|
||||
|
||||
// One row per message to one webhook (the try and its one retry together), with the exact body so it can be sent again by hand. The last 100 per webhook and no more than two weeks.
|
||||
export const webhookDeliveries = sqliteTable(
|
||||
"webhook_deliveries",
|
||||
{
|
||||
id: integer("id").primaryKey({ autoIncrement: true }),
|
||||
webhookId: integer("webhook_id")
|
||||
.notNull()
|
||||
.references(() => eventWebhooks.id, { onDelete: "cascade" }),
|
||||
event: text("event").notNull(),
|
||||
deliveryId: text("delivery_id").notNull(), // the message's id, which a receiver can use to ignore a repeat
|
||||
attempts: integer("attempts").notNull().default(1),
|
||||
ok: integer("ok", { mode: "boolean" }).notNull(),
|
||||
result: text("result").notNull(), // "200", or what went wrong
|
||||
body: text("body").notNull(), // the exact JSON that was sent (what the signature covers)
|
||||
retryOf: integer("retry_of"), // the delivery this one repeats, when somebody pressed Retry
|
||||
createdAt: text("created_at").notNull(), // ISO
|
||||
},
|
||||
(t) => [index("webhook_deliveries_webhook_idx").on(t.webhookId, t.createdAt)],
|
||||
);
|
||||
Reference in new issue
Block a user