PII Redaction
The WhatzBug SDK includes automatic pattern-based PII redaction for network request and response bodies.
How It Works
Before network data is captured or streamed, the SDK runs a redaction engine that:
- Detects common PII patterns (emails, phone numbers, credit cards, SSNs)
- Replaces matched values with
[REDACTED] - Applies redaction before data leaves the device
Enabling Redaction
PII redaction is enabled by default when debug mode is active. Initialize with:
await WhatzBug.init({
projectId: 'your-project-id',
publishableKey: 'pk_your_key',
apiBaseUrl: 'https://api.whatzbug.com',
debug: true, // PII redaction is on by default
});What Gets Redacted
| Pattern | Example |
|---|---|
| Email addresses | user@example.com → [REDACTED] |
| Phone numbers | +1-555-123-4567 → [REDACTED] |
| Credit card numbers | 4111-1111-1111-1111 → [REDACTED] |
| SSN-like patterns | 123-45-6789 → [REDACTED] |