Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update expression and anomaly detector documentation #8041

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

kkondaka
Copy link
Contributor

Description

Data Prepper supports arithmetic operators but the documentation is not updated to reflect that.
Also, Random Cut forest in anomaly detector processor support a new option which is not reflected in the documentation.

Issues Resolved

List any issues this PR will resolve, e.g. Closes [...].

Version

List the OpenSearch version to which this PR applies, e.g. 2.14, 2.12--2.14, or all.

Frontend features

If you're submitting documentation for an OpenSearch Dashboards feature, add a video that shows how a user will interact with the UI step by step. A voiceover is optional.

Checklist

  • By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and subject to the Developers Certificate of Origin.
    For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Copy link

Thank you for submitting your PR. The PR states are In progress (or Draft) -> Tech review -> Doc review -> Editorial review -> Merged.

Before you submit your PR for doc review, make sure the content is technically accurate. If you need help finding a tech reviewer, tag a maintainer.

When you're ready for doc review, tag the assignee of this PR. The doc reviewer may push edits to the PR directly or leave comments and editorial suggestions for you to address (let us know in a comment if you have a preference). The doc reviewer will arrange for an editorial review.

_data-prepper/pipelines/expression-syntax.md Outdated Show resolved Hide resolved
_data-prepper/pipelines/expression-syntax.md Outdated Show resolved Hide resolved
_data-prepper/pipelines/expression-syntax.md Outdated Show resolved Hide resolved
_data-prepper/pipelines/expression-syntax.md Outdated Show resolved Hide resolved
_data-prepper/pipelines/expression-syntax.md Outdated Show resolved Hide resolved
@kolchfa-aws kolchfa-aws assigned vagimeli and unassigned kolchfa-aws Aug 16, 2024
vagimeli and others added 5 commits August 19, 2024 09:51
Co-authored-by: David Venable <[email protected]>
Signed-off-by: Melissa Vagi <[email protected]>
Co-authored-by: David Venable <[email protected]>
Signed-off-by: Melissa Vagi <[email protected]>
Co-authored-by: David Venable <[email protected]>
Signed-off-by: Melissa Vagi <[email protected]>
Co-authored-by: David Venable <[email protected]>
Signed-off-by: Melissa Vagi <[email protected]>
Co-authored-by: David Venable <[email protected]>
Signed-off-by: Melissa Vagi <[email protected]>
Copy link
Collaborator

@vagimeli vagimeli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kkondaka Doc review completed. Please see the writing edits for clarity and conciseness. Once these changes are approved, I'll move this PR into editorial and then merge it.

@@ -53,6 +53,7 @@ You can configure `random_cut_forest` mode with the following options.
| `sample_size` | `256` | 100--2500 | The sample size used in the ML algorithm. |
| `time_decay` | `0.1` | 0--1.0 | The time decay value used in the ML algorithm. Used as the mathematical expression `timeDecay` divided by `SampleSize` in the ML algorithm. |
| `type` | `metrics` | N/A | The type of data sent to the algorithm. |
| `output_after` | 32 | N/A | Indicates the number of events to consume before outputting anamolies |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| `output_after` | 32 | N/A | Indicates the number of events to consume before outputting anamolies |
| `output_after` | 32 | N/A | Specifies the number of events to process before outputting any detected anomalies. |

<Any> / <Any>
```

The following are some example arithmetic expressions:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The following are some example arithmetic expressions:
The following are example arithmetic expressions:

```
{% include copy-curl.html %}

The following are some example arithmetic expressions used in conditional expressions :
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The following are some example arithmetic expressions used in conditional expressions :
The following are example arithmetic expressions that can be used in conditional expressions:

@@ -91,9 +93,64 @@ not /status_code in {200, 202}
```
{% include copy-curl.html %}

### Arithmetic expressions

Arithmetic expressions allow you to do few basic arithmetic operations. Arithmetic expressions may be combined with conditional expressions to make more complex conditional expressions. The available arithmetic operators are `+`, `-`, `*`, and `/` for doing addition, subtraction, multiplication and division respectively. The syntax for using the arithmetic operators is as follows:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Arithmetic expressions allow you to do few basic arithmetic operations. Arithmetic expressions may be combined with conditional expressions to make more complex conditional expressions. The available arithmetic operators are `+`, `-`, `*`, and `/` for doing addition, subtraction, multiplication and division respectively. The syntax for using the arithmetic operators is as follows:
Arithmetic expressions enable basic mathematical operations like addition, subtraction, multiplication, and division. These expressions can be combined with conditional expressions to create more complex conditional statements. The available arithmetic operators are +, -, *, and /. The syntax for using the arithmetic operators is as follows:

<String Variable or String Literal> + <String Variable or String Literal>
```

The following are some example string concatenation expressions:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The following are some example string concatenation expressions:
The following are example string concatenation expressions:

```
{% include copy-curl.html %}

The following are some example string concatenation expressions used in conditional expressions :
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The following are some example string concatenation expressions used in conditional expressions :
The following are example string concatenation expressions that can be used in conditional expressions:


### String concatenation expressions

String concatenation expressions allow you to concatenate strings to generate new strings. The concatenated strings can be used in conditional expressions too. The syntax for using string concatenation is as follows:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
String concatenation expressions allow you to concatenate strings to generate new strings. The concatenated strings can be used in conditional expressions too. The syntax for using string concatenation is as follows:
String concatenation expressions enable you to combine strings to create new strings. These concatenated strings can also be used within conditional expressions. The syntax for using string concatenation is as follows:

### Reserved symbols

Reserved symbols are symbols that are not currently used in the expression syntax but are reserved for possible future functionality or extensions. Reserved symbols include `^`, `*`, `/`, `%`, `+`, `-`, `xor`, `=`, `+=`, `-=`, `*=`, `/=`, `%=`, `++`, `--`, and `${<text>}`.
Reserved symbols are symbols that are not currently used in the expression syntax but are reserved for possible future functionality or extensions. Reserved symbols include `^`, `%`, `xor`, `=`, `+=`, `-=`, `*=`, `/=`, `%=`, `++`, `--`, and `${<text>}`.
Copy link
Collaborator

@vagimeli vagimeli Aug 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Reserved symbols are symbols that are not currently used in the expression syntax but are reserved for possible future functionality or extensions. Reserved symbols include `^`, `%`, `xor`, `=`, `+=`, `-=`, `*=`, `/=`, `%=`, `++`, `--`, and `${<text>}`.
Certain symbols, such as ^, %, xor, =, +=, -=, *=, /=, %=, ++, --, and ${<text>}, are reserved for future functionality or extensions. Reserved symbols include `^`, `%`, `xor`, `=`, `+=`, `-=`, `*=`, `/=`, `%=`, `++`, `--`, and `${<text>}`.

@vagimeli vagimeli added the 3 - Tech review PR: Tech review in progress label Aug 22, 2024
@vagimeli
Copy link
Collaborator

@dlvenable I've completed the doc review and accepted your edits and comments. I also edited text for readability and style. Please review and approve at your availability, and then I'll move this forward for publishing. Thank you.

@vagimeli vagimeli added Needs SME Waiting on input from subject matter expert 3 - Tech review PR: Tech review in progress and removed 3 - Tech review PR: Tech review in progress labels Aug 29, 2024
@vagimeli vagimeli added data-prepper and removed 3 - Tech review PR: Tech review in progress labels Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data-prepper Needs SME Waiting on input from subject matter expert
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants