Skip to content

Commit

Permalink
docs(ottl): Fix documentation issue for the replace* editors (open-te…
Browse files Browse the repository at this point in the history
…lemetry#31299)

docs(ottl): Fix documentation issue for the replace* editors
  • Loading branch information
rnishtala-sumo committed Feb 23, 2024
1 parent ee728f7 commit 0415066
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions pkg/ottl/ottlfuncs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ Examples:

### replace_all_matches

`replace_all_matches(target, pattern, replacement, Optional[function])`
`replace_all_matches(target, pattern, replacement, Optional[function], Optional[replacementFormat])`

The `replace_all_matches` function replaces any matching string value with the replacement string.

Expand All @@ -262,8 +262,7 @@ Examples:

### replace_all_patterns

`replace_all_patterns(target, mode, regex, replacement, Optional[function])`
`replace_all_patterns(target, mode, regex, replacement, function, replacementFormat)`
`replace_all_patterns(target, mode, regex, replacement, Optional[function], Optional[replacementFormat])`

The `replace_all_patterns` function replaces any segments in a string value or key that match the regex pattern with the replacement string.

Expand Down Expand Up @@ -291,7 +290,7 @@ If using OTTL outside of collector configuration, `$` should not be escaped and

### replace_match

`replace_match(target, pattern, replacement, Optional[function])`
`replace_match(target, pattern, replacement, Optional[function], Optional[replacementFormat])`

The `replace_match` function allows replacing entire strings if they match a glob pattern.

Expand All @@ -309,9 +308,7 @@ Examples:

### replace_pattern

`replace_pattern(target, regex, replacement, Optional[function])`
`replace_pattern(target, regex, replacement, function)`
`replace_pattern(target, regex, replacement, function, replacementFormat)`
`replace_pattern(target, regex, replacement, Optional[function], Optional[replacementFormat])`

The `replace_pattern` function allows replacing all string sections that match a regex pattern with a new value.

Expand Down

0 comments on commit 0415066

Please sign in to comment.