Skip to content

Graphorin API reference v0.15.1


Graphorin API reference / @graphorin/observability / redaction/patterns / RedactionPattern

Interface: RedactionPattern

Defined in: packages/observability/src/redaction/patterns.ts:58

Stable

One entry in the redaction catalogue.

Properties

PropertyModifierTypeDescriptionDefined in
categoryreadonlyPatternCategory-packages/observability/src/redaction/patterns.ts:60
descriptionreadonlystring-packages/observability/src/redaction/patterns.ts:61
mask?readonlystringReplacement string used when mode === 'mask'.packages/observability/src/redaction/patterns.ts:64
namereadonlystring-packages/observability/src/redaction/patterns.ts:59
optIn?readonlybooleanOptional opt-in flag. When true the pattern is not active by default; operators must add it to enabledPatterns explicitly. Used by the IPv4 / IPv6 patterns because raw IPs frequently appear in non-PII log lines (host headers, debug traces, …).packages/observability/src/redaction/patterns.ts:83
regexreadonlyRegExp-packages/observability/src/redaction/patterns.ts:62
verify?readonly(match) => booleanOptional per-match predicate. When present, a regex hit is only treated as a real match - and masked - when this returns true for the matched substring. Every catalogue consumer honours it: the OTLP RedactionValidator, the withRedaction provider middleware (both the request scrub and the streaming response scan), and user-supplied patterns may carry their own predicate. Used by the creditcard pattern to require a valid Luhn checksum plus a major-network leading digit so look-alike digit runs (epoch-ms timestamps, order ids, serialized floats) are not corrupted.packages/observability/src/redaction/patterns.ts:76