LumiqTrace’s PII redaction feature automatically removes sensitive values from event metadata before they leave your application. When redaction is enabled, any tag or metadata field whose key matches a configured list has its value replaced withDocumentation Index
Fetch the complete documentation index at: https://docs.lumiqtrace.com/llms.txt
Use this file to discover all available pages before exploring further.
"[REDACTED]" — the key is preserved so you can still see which field contained sensitive data, but the value never reaches LumiqTrace servers.
PII redaction applies to the
tags and metadata fields on events. It does not apply to prompt text or completion text — those are controlled by the separate storePrompts option and are not stored by default.Default redacted keys
The SDK ships with a default list of keys that are always redacted, regardless of configuration:redactKeys explicitly.
Adding custom keys
Pass additional key names in theredactKeys array at initialization. These are merged with the default list.
- TypeScript
- Python
tags: { email: "[email protected]" }, the SDK will transmit tags: { email: "[REDACTED]" } instead.
How matching works
Matching is case-insensitive and checks both exact key names and common nested-key patterns:"password"matchespassword,Password,PASSWORD"api_key"matchesapi_key,apiKey,API_KEY
tags and metadata objects. Nested objects are flattened one level deep before matching.
Replacing the default key list
To use only your own list — completely replacing the defaults — setreplaceDefaultRedactKeys: true:
- TypeScript
- Python
Example: verifying redaction
The following example shows how redaction behaves at runtime. Theemail and phone fields are replaced; feature and plan pass through unchanged.
Redaction and storePrompts
Redaction and prompt storage are independent controls:
| Setting | What it protects |
|---|---|
redactKeys | Values in tags and metadata fields |
storePrompts: false (default) | Prompt text and completion text — never sent |
storePrompts: true | Prompt text is stored; redaction does NOT apply to it |
storePrompts, you are responsible for ensuring your prompts do not contain PII. Redaction only applies to structured tag and metadata fields, not to the free-form prompt string.