Skip to content

Commit eae0a9d

Browse files
committed
Merge branch 'master' of github.com:opentracing-contrib/java-specialagent
2 parents 84b3ed5 + 3260fd9 commit eae0a9d

File tree

1 file changed

+23
-21
lines changed

1 file changed

+23
-21
lines changed

Diff for: rewrite/README.md

+23-21
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ You will get a warning if the configuration has a logical error and the spans wi
5353
If you have configurations for multiple agent rules and only one of them has a configuration error,
5454
only the faulty configuration will be removed and the other continues to work as expected.
5555

56-
## Blacklisting
56+
## Dropping data
5757

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.
5959

60-
### Blacklist a tag
60+
### Dropping a tag
6161

62-
The following rule definition blacklists the `http.url` tag:
62+
The following rule definition drops the `http.url` tag:
6363

6464
```json
6565
{
@@ -74,7 +74,7 @@ The following rule definition blacklists the `http.url` tag:
7474
}
7575
```
7676

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`:
7878

7979
```json
8080
{
@@ -92,7 +92,7 @@ If you only want to blacklist `http.url` if it equals `http://example.com`, add
9292

9393
**`value` is interpreted as a regex.**
9494

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`:
9696

9797
```json
9898
{
@@ -113,7 +113,7 @@ Note
113113
2. Use the [Java](https://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html) pattern syntax.
114114
3. It's possible to use a number of boolean as `value`, which will not be interpreted as a regular expression.
115115

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:
117117

118118
```json
119119
{
@@ -129,11 +129,11 @@ If you want to blacklist a specific tag whose value is the string literal `Are y
129129
}
130130
```
131131

132-
### Blacklist a log entry
132+
### Dropping a log entry
133133

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`.
135135

136-
To blacklist a log event, use
136+
To drop a log event, use
137137

138138
```json
139139
{
@@ -147,10 +147,10 @@ To blacklist a log event, use
147147
}
148148
```
149149

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).
152152

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
154154

155155
```json
156156
{
@@ -171,14 +171,14 @@ To blacklist a single field from a log entry with fields, use
171171
}
172172
```
173173

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.
175175

176-
### Blacklist an operation name
176+
### Dropping an operation name
177177

178178
Every span must have an operation name, hence it's not possible to create a span without an operation name.
179179

180180
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
182182
[setOperationName](https://javadoc.io/doc/io.opentracing/opentracing-api/0.20.2/io/opentracing/Span.html#setOperationName-java.lang.String-) had not been called.
183183

184184
```json
@@ -193,12 +193,12 @@ and this call can be blacklisted. The result is the same as if
193193
}
194194
```
195195

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).
198198

199199
## Advanced use cases
200200

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.
202202

203203
### Transforming values
204204

@@ -351,7 +351,7 @@ Multiple `input`s and `output`s can be used together, for example:
351351

352352
### Global rules
353353

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:
355355

356356
```json
357357
{
@@ -389,4 +389,6 @@ You can add arbitrary tags when a span is started as follows:
389389
}
390390
```
391391

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

Comments
 (0)