새벽 2시에 필요할 log
incident hit하면 — leaked credential, unauthorized action, 모델이 invent한 refund amount — log가 유일한 ground truth야. 없으면 추측이야.
request당 log할 것
- Request id (unique, support 위해 user한테 surface).
- Authenticated user id (session token만 X).
- Prompt version, model, sampler param.
- Full input (정책에 맞는 PII handling).
- Retrieved chunk / tool call / tool return.
- Reasoning trace (가능한 곳).
- Final output, output filter flag.
- 취해진 downstream action (idempotency key 가지고).
Storage와 retention
Log이 investigate할 만큼 길게 retain되고 privacy comply할 만큼 짧게. Encrypt at rest. Raw log은 incident responder만 access; aggregate metric은 broadly available.