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.

Add a sensitive message filter element as a child of the sensitive message filters element:
CODE
<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 the opted-in messages.
For example, if an application includes secret numeric values in its exception messages, the following configuration would mask any references of it:
CODE
<sensitive-message-filter   message-type="throwable"  
                                               match-type="id"
                                               match-pattern="test"
                                               redaction-regex="d+"/>
Warning: The exception message: `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.`