feat: retain bounded failed-request reproduction context

This commit is contained in:
Thomas Durieux committed 2026-11-14 21:44:48 +00:00
1 parent 3a1d013b11
commit 5dbf3e7829
22 files changed
+198 -67

No files matched your search

+1 -1
View File
@@ -1,7 +1,7 @@
import { AsyncLocalStorage } from "async_hooks";
import { randomUUID } from "crypto";
export interface LogContext { requestId?: string; jobId?: string; attempt?: number; service?: string; route?: string; method?: string }
export interface LogContext { requestId?: string; jobId?: string; attempt?: number; service?: string; route?: string; method?: string; requestPath?: string }
export const logContext = new AsyncLocalStorage<LogContext>();
export const validTraceId = (value: unknown): value is string => typeof value === "string" &&
/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/.test(value);