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: pipeline/filters/rewrite-tag.md
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ The `rewrite_tag` filter, allows to re-emit a record under a new Tag. Once a rec
10
10
11
11
## How it Works
12
12
13
-
The way it works is defining rules that matches specific record key content against a regular expression, if a match exists, a new record with the defined Tag will be emitted and go through the beginning of the pipeline. Multiple rules can be specified and they are processed in order until one of them matches.
13
+
The way it works is defining rules that matches specific record key content against a regular expression, if a match exists, **a new record with the defined Tag will be emitted, entering from the beginning of the pipeline.** Multiple rules can be specified and they are processed in order until one of them matches.
14
14
15
15
The new Tag to define can be composed by:
16
16
@@ -33,7 +33,7 @@ The `rewrite_tag` filter supports the following configuration parameters:
33
33
34
34
## Rules
35
35
36
-
A rule aims to define matching criteria and specify how to create a new Tag for a record. You can define one or multiple rules in the same configuration section. The rules have the following format:
36
+
A Rule aims to define matching criteria and specify how to create a new Tag for a record. You can define one or multiple Rules in the same configuration section. The Rules have the following format:
37
37
38
38
```text
39
39
$KEY REGEX NEW_TAG KEEP
@@ -79,15 +79,15 @@ If `$name` equals `abc-123` , then the following **placeholders** will be create
79
79
*`$1` = "abc"
80
80
*`$2` = "123"
81
81
82
-
If the Regular expression do not matches an incoming record, the rule will be skipped and the next rule\(if any\) will be processed.
82
+
If the Regular expression do not matches an incoming record, the Rule will be skipped and the next Rule\(if any\) will be processed.
83
83
84
84
### New Tag
85
85
86
-
If a regular expression has matched the value of the defined key in the rule, we are ready to compose a new Tag for that specific record. The tag is a concatenated string that can contain any of the following characters: `a-z`,`A-Z`, `0-9` and `.-,`.
86
+
If a regular expression has matched the value of the defined key in the Rule, we are ready to compose a new Tag for that specific record. The tag is a concatenated string that can contain any of the following characters: `a-z`,`A-Z`, `0-9` and `.-,`.
87
87
88
88
A Tag can take any string value from the matching record, the original tag it self, environment variable or general placeholder.
89
89
90
-
Consider the following incoming data on the rule:
90
+
Consider the following incoming data on the Rule:
91
91
92
92
* Tag = aa.bb.cc
93
93
* Record = `{"name": "abc-123", "ss": {"s1": {"s2": "flb"}}}`
@@ -109,9 +109,9 @@ We make use of placeholders, record content and environment variables.
109
109
110
110
### Keep
111
111
112
-
If a rule matches the criteria the filter will emit a copy of the record with the new defined Tag. The property keep takes a boolean value to define if the original record with the old Tag must be preserved and continue in the pipeline or just be discarded.
112
+
If a record matches a Rule the filter will emit a copy of the record with the new defined Tag. The property keep takes a boolean value to define if the original record with the old Tag must be preserved and continue in the pipeline or just be discarded.
113
113
114
-
You can use `true` or `false` to decide the expected behavior. There is no default value and this is a mandatory field in the rule.
114
+
You can use `true` or `false` to decide the expected behavior. There is no default value and this is a mandatory field in the Rule.
0 commit comments