What Must Be Masked?

Classify data before logging it

Personally identifiable information (PII) is data that identifies or can be linked to a person. Examples include email addresses and telephone numbers. Credentials such as API keys are not always legally classified as PII, but they require at least the same protection because they grant access.

An LLM can repeat sensitive text from a prompt, retrieved document, tool response, or conversation history. Therefore redaction belongs on every route to storage or display: application logs, tracing systems, experiment trackers, chat transcripts, and streamed browser output.

Analogy: A mailroom blacks out account numbers before copying a form. It must redact before the copier, because collecting every copy afterward is unreliable.
Scenario: A model response includes an email alias, an international phone number, and two provider keys. The logger's simple expressions cover only name@example.com and 555-555-5555, so the log becomes a breach artifact.

Use synthetic canaries in tests, never real customer data or live credentials. If a real secret reaches a log, redaction alone is not enough: revoke or rotate the credential and follow the incident process.