mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-12-02 17:13:33 +01:00
feat(logging): record each outbound call to GitHub and other external services
One info record per HTTP request to an external host (fetch and node:http), with method, host, a fixed endpoint label, status or error code, duration and the caller's requestId. Internal hops are skipped. Labels keep only literal segments, so no owner, repository, path or identifier is logged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2317544c5a
commit
e571268e56
9 files changed
+307
-11
No files matched your search
@@ -4,7 +4,7 @@ import { logContext, validTraceId } from "../core/log-context";
|
||||
import { LOG_EVENTS } from "../core/log-schema";
|
||||
|
||||
const services = ["api", "streamer", "worker", "nginx", "mongodb", "redis", "backup"];
|
||||
const events = new Set([...Object.values(LOG_EVENTS), "deployment", "application_log", "webhook_log", "request_completed", "request_slow", "request_cancelled", "process_fatal_error", "process_started", "process_heartbeat", "job_started", "job_completed", "job_failed", "job_stalled", "queue_heartbeat", "edge_request", "infrastructure_log"]);
|
||||
const events = new Set([...Object.values(LOG_EVENTS), "deployment", "application_log", "webhook_log", "request_completed", "request_slow", "request_cancelled", "process_fatal_error", "process_started", "process_heartbeat", "job_started", "job_completed", "job_failed", "job_stalled", "queue_heartbeat", "edge_request", "infrastructure_log", "external_request"]);
|
||||
const windows: Record<string, number> = { "15m": 15, "1h": 60, "6h": 360, "24h": 1440 };
|
||||
let active = 0;
|
||||
export class InvalidLogQuery extends Error {}
|
||||
|
||||
Reference in new issue
Block a user