Repository navigation
feat: redact what every sink writes, exception text included - #8
Merged
Merged
Conversation
An app passes Redact; a RedactingEnricher added after Inventory's own enrichers reaches the exception fields and log context, and a RedactingSink in front of each sink hands on the exception's text redacted.
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.
An app passes
Redact(onInventoryOptions/InventoryMauiOptions): given any text, the same text with what must not be logged replaced.RedactingEnricheris added after Inventory's own enrichers, so it reaches the exception fields (ExceptionMessage,ExceptionInnerChain, …) and the log context, which an enricher inConfigurecannot.RedactingSinksits in front of every sink — local files, logcat, the holding and shipping Better Stack sinks — and hands on aRedactedExceptionwhoseToString()is the original's, redacted. Its type, message and stack read as they did.For Register's email redaction: today its enricher runs in
Configure, so addresses in exception text reach Better Stack as they were.Tests:
RedactionTests(enricher, sink,WriteToRedacted), and aLogShipperTestscase that a shipped event's exception is redacted. README has a Redaction section.