@@ -152,6 +152,9 @@ The `replace_all_matches` function replaces any matching string value with the r
152
152
153
153
Each string value in ` target ` that matches ` pattern ` will get replaced with ` replacement ` . Non-string values are ignored.
154
154
155
+ There is currently a bug with OTTL that does not allow the pattern to end with ` \\" ` .
156
+ [ See Issue 23238 for details] ( https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/23238 ) .
157
+
155
158
Examples:
156
159
157
160
- ` replace_all_matches(attributes, "/user/*/list/*", "/user/{userId}/list/{listId}") `
@@ -170,6 +173,10 @@ If one or more sections of `target` match `regex` they will get replaced with `r
170
173
171
174
The ` replacement ` string can refer to matched groups using [ regexp.Expand syntax] ( https://pkg.go.dev/regexp#Regexp.Expand ) .
172
175
176
+ There is currently a bug with OTTL that does not allow the pattern to end with ` \\" ` .
177
+ If your pattern needs to end with backslashes, add something inconsequential to the end of the pattern such as ` {1} ` , ` $ ` , or ` .* ` .
178
+ [ See Issue 23238 for details] ( https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/23238 ) .
179
+
173
180
Examples:
174
181
175
182
- ` replace_all_patterns(attributes, "value", "/account/\\d{4}", "/account/{accountId}") `
@@ -190,6 +197,9 @@ The `replace_match` function allows replacing entire strings if they match a glo
190
197
191
198
If ` target ` matches ` pattern ` it will get replaced with ` replacement ` .
192
199
200
+ There is currently a bug with OTTL that does not allow the pattern to end with ` \\" ` .
201
+ [ See Issue 23238 for details] ( https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/23238 ) .
202
+
193
203
Examples:
194
204
195
205
- ` replace_match(attributes["http.target"], "/user/*/list/*", "/user/{userId}/list/{listId}") `
@@ -206,6 +216,10 @@ If one or more sections of `target` match `regex` they will get replaced with `r
206
216
207
217
The ` replacement ` string can refer to matched groups using [ regexp.Expand syntax] ( https://pkg.go.dev/regexp#Regexp.Expand ) .
208
218
219
+ There is currently a bug with OTTL that does not allow the pattern to end with ` \\" ` .
220
+ If your pattern needs to end with backslashes, add something inconsequential to the end of the pattern such as ` {1} ` , ` $ ` , or ` .* ` .
221
+ [ See Issue 23238 for details] ( https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/23238 ) .
222
+
209
223
Examples:
210
224
211
225
- ` replace_pattern(resource.attributes["process.command_line"], "password\\=[^\\s]*(\\s?)", "password=***") `
@@ -401,6 +415,9 @@ If target is not a string, it will be converted to one:
401
415
402
416
If target is nil, false is always returned.
403
417
418
+ There is currently a bug with OTTL that does not allow the target string to end with ` \\" ` .
419
+ [ See Issue 23238 for details] ( https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/23238 ) .
420
+
404
421
Examples:
405
422
406
423
- ` IsMatch(attributes["http.path"], "foo") `
@@ -545,6 +562,9 @@ The `Split` Converter separates a string by the delimiter, and returns an array
545
562
546
563
If the ` target ` is not a string or does not exist, the ` Split ` Converter will return an error.
547
564
565
+ There is currently a bug with OTTL that does not allow the target string to end with ` \\" ` .
566
+ [ See Issue 23238 for details] ( https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/23238 ) .
567
+
548
568
Examples:
549
569
550
570
- ``` Split("A|B|C", "|") ```
0 commit comments