Skip to content

Commit

Permalink
Modify descriptions of processor schemas (opensearch-project#5083)
Browse files Browse the repository at this point in the history
* modify descriptions
* change copy values description to align with pending documentation update

Signed-off-by: Katherine Shen <katshen@amazon.com>
  • Loading branch information
shenkw1 authored Oct 18, 2024
1 parent 2575db3 commit 7dd8052
Show file tree
Hide file tree
Showing 14 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public class AggregateProcessorConfig {
@JsonProperty("aggregated_events_tag")
private String aggregatedEventsTag;

@JsonPropertyDescription("A <a href=\"https://opensearch.org/docs/latest/data-prepper/pipelines/expression-syntax/\">conditional expression</a>, such as '/some-key == \"test\"', that will be evaluated to determine whether the processor will be run on the event.")
@JsonPropertyDescription("A <a href=\"https://opensearch.org/docs/latest/data-prepper/pipelines/expression-syntax/\">conditional expression</a>, such as <code>/some-key == \"test\"</code>, that will be evaluated to determine whether the processor will be run on the event.")
@JsonProperty("aggregate_when")
private String whenCondition;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class DecompressProcessorConfig {
@JsonProperty("tags_on_failure")
private List<String> tagsOnFailure = List.of("_decompression_failure");

@JsonPropertyDescription("A <a href=\"https://opensearch.org/docs/latest/data-prepper/pipelines/expression-syntax/\">conditional expression</a>, such as <code>'/is_compressed == true'</code>, that determines when the decompress processor will run on certain events.")
@JsonPropertyDescription("A <a href=\"https://opensearch.org/docs/latest/data-prepper/pipelines/expression-syntax/\">conditional expression</a>, such as <code>/is_compressed == true</code>, that determines when the decompress processor will run on certain events.")
@JsonProperty("decompress_when")
private String decompressWhen;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class DissectProcessorConfig {
@JsonPropertyDescription("Specifies a condition for performing the <code>dissect</code> operation using a " +
"<a href=\"https://opensearch.org/docs/latest/data-prepper/pipelines/expression-syntax/\">conditional expression</a>. " +
"If specified, the <code>dissect</code> operation will only run when the expression evaluates to true. " +
"For example, <code>'/some_value == \"log\"'</code>.")
"For example, <code>/some_value == \"log\"</code>.")
private String dissectWhen;

public String getDissectWhen(){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
@JsonClassDescription("The <code>drop_events</code> processor conditionally drops events.")
public class DropEventProcessorConfig {

@JsonPropertyDescription("A <a href=\"https://opensearch.org/docs/latest/data-prepper/pipelines/expression-syntax/\">conditional expression</a> such as <code>'/log_type == \"DEBUG\"'</code>. " +
@JsonPropertyDescription("A <a href=\"https://opensearch.org/docs/latest/data-prepper/pipelines/expression-syntax/\">conditional expression</a> such as <code>/log_type == \"DEBUG\"</code>. " +
"The <code>drop_when</code> processor will drop all events where the condition evaluates to true. Those events will not go to any further processors or sinks.")
@JsonProperty("drop_when")
@NotEmpty
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public class GeoIPProcessorConfig {
private List<String> tagsOnNoValidIp;

@JsonProperty("geoip_when")
@JsonPropertyDescription("A <a href=\"https://opensearch.org/docs/latest/data-prepper/pipelines/expression-syntax/\">conditional expression</a> such as <code>'/srcaddr != \"8.8.8.8\"'</code>. " +
@JsonPropertyDescription("A <a href=\"https://opensearch.org/docs/latest/data-prepper/pipelines/expression-syntax/\">conditional expression</a> such as <code>/srcaddr != \"8.8.8.8\"</code>. " +
"If specified, the <code>geoip</code> processor will only run on events when the expression evaluates to true. ")
private String whenCondition;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public class GrokProcessorConfig {
private List<String> tagsOnTimeout = Collections.emptyList();

@JsonProperty(GROK_WHEN)
@JsonPropertyDescription("A <a href=\"https://opensearch.org/docs/latest/data-prepper/pipelines/expression-syntax/\">conditional expression</a> such as <code>'/test != false'</code>. " +
@JsonPropertyDescription("A <a href=\"https://opensearch.org/docs/latest/data-prepper/pipelines/expression-syntax/\">conditional expression</a> such as <code>/test != false</code>. " +
"If specified, the <code>grok</code> processor will only run on events when the expression evaluates to true. ")
private String grokWhen;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public static class Entry {

@JsonProperty("add_when")
@JsonPropertyDescription("A <a href=\"https://opensearch.org/docs/latest/data-prepper/pipelines/expression-syntax/\">conditional expression</a>, " +
"such as <code>/some-key == \"test\"'</code>, that will be evaluated to determine whether the processor will be run on the event.")
"such as <code>/some-key == \"test\"</code>, that will be evaluated to determine whether the processor will be run on the event.")
private String addWhen;

public String getKey() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public static class Entry {

@JsonProperty("copy_when")
@JsonPropertyDescription("A <a href=\"https://opensearch.org/docs/latest/data-prepper/pipelines/expression-syntax/\">conditional expression</a>, " +
"such as <code>/some-key == \"test\"'</code>, that will be evaluated to determine whether the processor will be run on the event.")
"such as <code>/some-key == \"test\"</code>, that will be evaluated to determine whether the processor will be run on the event.")
private String copyWhen;

public String getFromKey() {
Expand Down Expand Up @@ -76,11 +76,11 @@ public Entry() {
private List<Entry> entries;

@JsonProperty("from_list")
@JsonPropertyDescription("The source list to copy values from.")
@JsonPropertyDescription("The key of the list of objects to be copied.")
private String fromList;

@JsonProperty("to_list")
@JsonPropertyDescription("The target list to copy values to.")
@JsonPropertyDescription("The key of the new list to be added.")
private String toList;

@JsonProperty("overwrite_if_to_list_exists")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public String getOptionValue() {

@JsonProperty("list_to_map_when")
@JsonPropertyDescription("A <a href=\"https://opensearch.org/docs/latest/data-prepper/pipelines/expression-syntax/\">conditional expression</a>, " +
"such as <code>/some-key == \"test\"'</code>, that will be evaluated to determine whether the processor will be " +
"such as <code>/some-key == \"test\"</code>, that will be evaluated to determine whether the processor will be " +
"run on the event. By default, all events will be processed unless otherwise stated.")
private String listToMapWhen;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public class MapToListProcessorConfig {

@JsonProperty("map_to_list_when")
@JsonPropertyDescription("A <a href=\"https://opensearch.org/docs/latest/data-prepper/pipelines/expression-syntax/\">conditional expression</a>, " +
"such as <code>/some-key == \"test\"'</code>, that will be evaluated to determine whether the processor will " +
"such as <code>/some-key == \"test\"</code>, that will be evaluated to determine whether the processor will " +
"be run on the event. By default, all events will be processed unless otherwise stated.")
private String mapToListWhen;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public static class Entry {

@JsonProperty("rename_when")
@JsonPropertyDescription("A <a href=\"https://opensearch.org/docs/latest/data-prepper/pipelines/expression-syntax/\">conditional expression</a>, " +
"such as <code>/some-key == \"test\"'</code>, that will be evaluated to determine whether the processor will be " +
"such as <code>/some-key == \"test\"</code>, that will be evaluated to determine whether the processor will be " +
"run on the event. By default, all events will be processed unless otherwise stated.")
private String renameWhen;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class SelectEntriesProcessorConfig {

@JsonProperty("select_when")
@JsonPropertyDescription("A <a href=\"https://opensearch.org/docs/latest/data-prepper/pipelines/expression-syntax/\">conditional expression</a>, " +
"such as <code>/some-key == \"test\"'</code>, that will be evaluated to determine whether the processor will be " +
"such as <code>/some-key == \"test\"</code>, that will be evaluated to determine whether the processor will be " +
"run on the event. Default is <code>null</code>. All events will be processed unless otherwise stated.")
private String selectWhen;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public class ObfuscationProcessorConfig {
private List<String> tagsOnMatchFailure;

@JsonProperty("obfuscate_when")
@JsonPropertyDescription("A <a href=\"https://opensearch.org/docs/latest/data-prepper/pipelines/expression-syntax/\">conditional expression</a> such as <code>'/is_testing_data == true'</code>. " +
@JsonPropertyDescription("A <a href=\"https://opensearch.org/docs/latest/data-prepper/pipelines/expression-syntax/\">conditional expression</a> such as <code>/is_testing_data == true</code>. " +
"If specified, the <code>obfuscate</code> processor will only run on events when the expression evaluates to true. ")
private String obfuscateWhen;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public class ParseIonProcessorConfig implements CommonParseConfig {
private List<String> tagsOnFailure;

@JsonProperty("parse_when")
@JsonPropertyDescription("A Data Prepper [conditional expression](https://opensearch.org/docs/latest/data-prepper/pipelines/expression-syntax/), such as '/some-key == \"test\"', that will be evaluated to determine whether the processor will be run on the event.")
@JsonPropertyDescription("A Data Prepper [conditional expression](https://opensearch.org/docs/latest/data-prepper/pipelines/expression-syntax/), such as <code>/some-key == \"test\"</code>, that will be evaluated to determine whether the processor will be run on the event.")
private String parseWhen;

@JsonProperty(value = "handle_failed_events", defaultValue = "skip")
Expand Down

0 comments on commit 7dd8052

Please sign in to comment.