Redacting Information from Log Lines
Redacting will allow you redact sensitive information within your logs
You can read more about log redaction here.
Annotation
"log.config.scalyr.com/redaction_rules.match_expression": "userInfo=([^ ]+) [^ ]+"
"log.config.scalyr.com/redaction_rules.replacement": "userInfo=\\1"
CLI
kubectl annotate pod <pod name> --overwrite log.config.scalyr.com/redaction_rules.0.match_expression='userInfo=([^ ]+) [^ ]+'
kubectl annotate pod <pod name> --overwrite log.config.scalyr.com/redaction_rules.0.replacement='userInfo=\\1'
YAML
metadata:
annotations:
"log.config.scalyr.com/redaction_rules.0.match_expression": "userInfo=([^ ]+) [^ ]+"
"log.config.scalyr.com/redaction_rules.0.replacement": "userInfo=\\1"

Comments
0 comments
Please sign in to leave a comment.