Add a Sensitive Message Filter
You can use sensitive message filters to configure the agent to obfuscate sensitive information contained within text messages collected by the agent from log messages, or detail messages from exceptions.
<sensitive-message-filter message-type="..."
match-type="..."
match-pattern="..."
redaction-regex="..."/>
-
message-type: Specify the type of message for which the filter applies. Allowed values are throwable, logger-message, all. match-type: Specify how to match the pattern with data. The possible value is one of EQUALS, CONTAINS, STARTSWITH, ENDSWITH, REGEX.match-pattern: Specify the pattern to search in data that, when matched, the message is opted in for redaction.redaction-regex: Specify a regular expression identifying data that should be redacted from theopted-inmessages.
<sensitive-message-filter message-type="throwable"
match-type="id"
match-pattern="test"
redaction-regex="d+"/>
`Unable to update the user profile (ID: 4215908), corrupted or incoherent data given` will be collected as `Unable to update the user profile (ID: ****), corrupted or incoherent data given.`