Dither and Bicker

Structured Edge Access Logging Without Accidental PII Leakage

November 08, 2026 • By Chris • Telemetry & Privacy

Default Nginx and Apache combined log formats dump full request URIs, referrers, and raw client IPv4/IPv6 addresses straight to disk. Once those logs hit an object bucket or search index, scrubbing an accidental ?token= or ?email= query parameter is painful.

Log Path and Status, Not Secret Query Strings

For operational telemetry—tracking 200/404/5xx rates, bot user-agents, and latency—you rarely need full query strings. Redacting sensitive keys at the edge keeps logs useful without turning them into a compliance liability:

{
  "ts": "2026-11-08T14:22:09Z",
  "method": "GET",
  "path": "/auth/callback",
  "query_keys": ["state"],
  "status": 200,
  "ms": 14,
  "ua_family": "Googlebot"
}

Hashing Client IPs With a Rotating Salt

If you need approximate unique-visitor counts or rate-limit forensics, truncate IPv4 addresses to /24 (or IPv6 to /48) or hash them with a daily rotating secret salt before writing the JSON line. That preserves short-term burst detection while preventing long-term cross-day tracking.