mirror of
https://github.com/tiennm99/claude-status-webhook.git
synced 2026-04-17 15:20:37 +00:00
refactor: replace metrics with console.log, remove HMAC
Statuspage doesn't support HMAC signatures - removed all HMAC code. Replaced KV-based metrics with simple console.log for CF Workers logs. Queue consumer logs batch summary (sent/failed/retried/removed).
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
import { getSubscribersByType } from "./kv-store.js";
|
||||
import { humanizeStatus, escapeHtml } from "./status-fetcher.js";
|
||||
import { trackMetrics } from "./metrics.js";
|
||||
|
||||
/**
|
||||
* Timing-safe string comparison
|
||||
*/
|
||||
@@ -93,11 +91,5 @@ export async function handleStatuspageWebhook(c) {
|
||||
|
||||
console.log(`Enqueued ${messages.length} messages for ${category}${componentName ? `:${componentName}` : ""}`);
|
||||
|
||||
await trackMetrics(c.env.claude_status, {
|
||||
webhooksReceived: 1,
|
||||
messagesEnqueued: messages.length,
|
||||
lastWebhookAt: new Date().toISOString(),
|
||||
});
|
||||
|
||||
return c.text("OK", 200);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user