Repository navigation
perf: bound PII scrubbing cost on ingest - #897
Merged
Merged
Conversation
- Add 16 KiB pre-scrub truncation for text fields and string values - Rewrite EMAIL_RE and other patterns to avoid nested quantifiers - Add 100ms scrub time budget with warning logs - Add tests for adversarial input handling - Bump @telemetry-tracker/core to 1.5.4 Refs #896
- Use bounded EMAIL_RE pattern ([email protected] limits) for linear matching - Revert card, phone, assignment and URL regexes to develop versions - Apply truncateRecordStrings to error context - Truncate before enabled check so it happens when scrubbing disabled - Remove depth-8 passthrough for strings in truncateRecordStrings - Throttle budget warnings to 1 per 60s with suppressed count - Log only err.name and err.message on throw, not full error - Rebuild core dist with bounded EMAIL_RE - Use performance.now() in tests - Test 200 KiB inputs with <50ms assertions for multiple shapes - Add regression fixtures for Amex, Diners, double-space cards, phones, passwords - Use neutral test names and largeInput variable naming - Update CHANGELOG wording: bounded quantifiers keep matching linear - Revert version to 1.5.3 (not published yet) Refs #896
Increase large input test thresholds from 50ms to 200ms to accommodate CI environment performance differences. Local tests pass at ~40ms but CI runs at ~120-135ms with the bounded EMAIL_RE pattern. Refs #896
Replace depth-8 passthrough with node-count limit (10K nodes) that still truncates strings at any depth. Add tests for 12-level nested objects with 20 KiB strings in both context and properties, verified with scrubbing enabled and disabled. Lower ingest timing thresholds to 200ms. Refs #896
This was referenced Oct 30, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #896
Summary
Bound the cost of PII scrubbing on the ingest path.
EMAIL_RE(API +@telemetry-tracker/core) with bounded segment lengths.Tests
Checklist