You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/agent/logs/advanced_log_collection.md
+23-23Lines changed: 23 additions & 23 deletions
Original file line number
Diff line number
Diff line change
@@ -106,31 +106,31 @@ logs:
106
106
107
107
**Note**: With Agent version 7.17+, the `replace_placeholder` string can expand references to capture groups such as `$1`, `$2` and so forth. If you want a string to follow the capture group with no space in between, use the format `${<GROUP_NUMBER>}`. For instance, to scrub user information from the log `User email: [email protected]`, the following configuration:
108
108
109
-
```
110
-
(...)
109
+
```yaml
110
+
# (...)
111
111
pattern: "(User email: )[^@]*@(.*)"
112
112
replace_placeholder: "$1 masked_user@${2}"
113
113
```
114
114
115
115
Would send the following log to Datadog: `User email: [email protected]`
116
116
117
-
###Commonly Used Log Processing Rules
117
+
###Commonly Used Log Processing Rules
118
118
119
-
**Generic String: "sensitive-info"**
119
+
##### Generic String: "sensitive-info"
120
120
121
121
Lines containing the string `sensitive-info` are not sent to Datadog.
122
122
123
-
```
123
+
```yaml
124
124
- type: exclude_at_match
125
125
name: exclude_sensitive_info
126
126
pattern: (?:sensitive\-info)
127
127
```
128
128
129
-
**my_key=value**
129
+
##### my_key=value
130
130
131
131
When the string "my_key=" is found, letters, numbers, spaces, and underscores following the string are redacted with `my_key=[VALUE REDACTED]`.
0 commit comments