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: rewrite/README.md
+23-21
Original file line number
Diff line number
Diff line change
@@ -53,13 +53,13 @@ You will get a warning if the configuration has a logical error and the spans wi
53
53
If you have configurations for multiple agent rules and only one of them has a configuration error,
54
54
only the faulty configuration will be removed and the other continues to work as expected.
55
55
56
-
## Blacklisting
56
+
## Dropping data
57
57
58
-
Blacklisting is the most common use case to either reduce the traffic/noise - or to redact user information.
58
+
Dropping data is the most common use case to either reduce the traffic/noise - or to redact user information.
59
59
60
-
### Blacklist a tag
60
+
### Dropping a tag
61
61
62
-
The following rule definition blacklists the `http.url` tag:
62
+
The following rule definition drops the `http.url` tag:
63
63
64
64
```json
65
65
{
@@ -74,7 +74,7 @@ The following rule definition blacklists the `http.url` tag:
74
74
}
75
75
```
76
76
77
-
If you only want to blacklist`http.url` if it equals `http://example.com`, add a `value`:
77
+
If you only want to drop`http.url` if it equals `http://example.com`, add a `value`:
78
78
79
79
```json
80
80
{
@@ -92,7 +92,7 @@ If you only want to blacklist `http.url` if it equals `http://example.com`, add
92
92
93
93
**`value` is interpreted as a regex.**
94
94
95
-
If you want to blacklist all `http.url`s that start with `http://`, specify a regex in `value`:
95
+
If you want to drop all `http.url`s that start with `http://`, specify a regex in `value`:
96
96
97
97
```json
98
98
{
@@ -113,7 +113,7 @@ Note
113
113
2. Use the [Java](https://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html) pattern syntax.
114
114
3. It's possible to use a number of boolean as `value`, which will not be interpreted as a regular expression.
115
115
116
-
If you want to blacklist a specific tag whose value is the string literal `Are you happy?`, make sure to escape the `?`, because `value` is interpreted as a regex:
116
+
If you want to drop a specific tag whose value is the string literal `Are you happy?`, make sure to escape the `?`, because `value` is interpreted as a regex:
117
117
118
118
```json
119
119
{
@@ -129,11 +129,11 @@ If you want to blacklist a specific tag whose value is the string literal `Are y
129
129
}
130
130
```
131
131
132
-
### Blacklist a log entry
132
+
### Dropping a log entry
133
133
134
-
Blacklisting a log entry uses the same syntax as blacklisting a tag, except that the `type` is `log`.
134
+
Dropping a log entry uses the same syntax as dropping a tag, except that the `type` is `log`.
135
135
136
-
To blacklist a log event, use
136
+
To drop a log event, use
137
137
138
138
```json
139
139
{
@@ -147,10 +147,10 @@ To blacklist a log event, use
147
147
}
148
148
```
149
149
150
-
This would blacklist all log events (for jedis).
151
-
You can restrict the log events to be blacklisted using `value` (see above).
150
+
This would drop all log events (for jedis).
151
+
You can restrict the log events to be dropped using `value` (see above).
152
152
153
-
To blacklist a single field from a log entry with fields, use
153
+
To drop a single field from a log entry with fields, use
154
154
155
155
```json
156
156
{
@@ -171,14 +171,14 @@ To blacklist a single field from a log entry with fields, use
171
171
}
172
172
```
173
173
174
-
Only the `http.method` and `http.url` fields will be removed from the log entry. If all fields from the log entry are blacklisted, the entire log entry is blacklisted as well.
174
+
Only the `http.method` and `http.url` fields will be removed from the log entry. If all fields from the log entry are dropped, the entire log entry is dropped as well.
175
175
176
-
### Blacklist an operation name
176
+
### Dropping an operation name
177
177
178
178
Every span must have an operation name, hence it's not possible to create a span without an operation name.
179
179
180
180
However, it's also possible to change the operation name of a span after it has started -
181
-
and this call can be blacklisted. The result is the same as if
181
+
and this call can be dropped. The result is the same as if
182
182
[setOperationName](https://javadoc.io/doc/io.opentracing/opentracing-api/0.20.2/io/opentracing/Span.html#setOperationName-java.lang.String-) had not been called.
183
183
184
184
```json
@@ -193,12 +193,12 @@ and this call can be blacklisted. The result is the same as if
193
193
}
194
194
```
195
195
196
-
This would blacklist all calls to `setOperationName` (in jedis).
197
-
You can restrict calls to be blacklisted using `value` (see above).
196
+
This would drop all calls to `setOperationName` (in jedis).
197
+
You can restrict calls to be dropped using `value` (see above).
198
198
199
199
## Advanced use cases
200
200
201
-
The remaining use case cover advanced scenarios that go beyond blacklisting.
201
+
The remaining use case cover advanced scenarios that go beyond dropping data.
202
202
203
203
### Transforming values
204
204
@@ -351,7 +351,7 @@ Multiple `input`s and `output`s can be used together, for example:
351
351
352
352
### Global rules
353
353
354
-
If you need to apply a rule globally, you can use `all`, e.g. for blacklisting all `http.url` tags:
354
+
If you need to apply a rule globally, you can use `*`, e.g. for dropping all `http.url` tags:
355
355
356
356
```json
357
357
{
@@ -389,4 +389,6 @@ You can add arbitrary tags when a span is started as follows:
389
389
}
390
390
```
391
391
392
-
This would add a tag `service` with value `my_service` to all spans in all rules.
392
+
This would add a tag `service` with value `my_service` to all spans in all rules.
393
+
394
+
Note that this would not work as expected with a `log` output. If the [setOperationName](https://javadoc.io/doc/io.opentracing/opentracing-api/0.20.2/io/opentracing/Span.html#setOperationName-java.lang.String-) is called after the span was started, then you would have two log entries instead of one.
0 commit comments