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:

  1. Detects common PII patterns (emails, phone numbers, credit cards, SSNs)
  2. Replaces matched values with [REDACTED]
  3. 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

PatternExample
Email addressesuser@example.com[REDACTED]
Phone numbers+1-555-123-4567[REDACTED]
Credit card numbers4111-1111-1111-1111[REDACTED]
SSN-like patterns123-45-6789[REDACTED]

Related