diff --git a/data-prepper-plugins/aggregate-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/aggregate/AggregateProcessorConfig.java b/data-prepper-plugins/aggregate-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/aggregate/AggregateProcessorConfig.java
index 93d4cc7f17..d1ae3f1f81 100644
--- a/data-prepper-plugins/aggregate-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/aggregate/AggregateProcessorConfig.java
+++ b/data-prepper-plugins/aggregate-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/aggregate/AggregateProcessorConfig.java
@@ -23,7 +23,7 @@
"Then, the processor performs an action on each group, helping reduce unnecessary log volume and " +
"creating aggregated logs over time.")
public class AggregateProcessorConfig {
- static int DEFAULT_GROUP_DURATION_SECONDS = 180;
+ static final int DEFAULT_GROUP_DURATION_SECONDS = 180;
@JsonPropertyDescription("An unordered list by which to group events. Events with the same values as these keys are put into the same group. " +
"If an event does not contain one of the identification_keys
, then the value of that key is considered to be equal to null
. " +
@@ -39,7 +39,7 @@ public class AggregateProcessorConfig {
private PluginModel aggregateAction;
@JsonPropertyDescription("The amount of time that a group should exist before it is concluded automatically. Supports ISO_8601 notation strings (\"PT20.345S\", \"PT15M\", etc.) as well as simple notation for seconds (\"60s\") and milliseconds (\"1500ms\"). Default value is 180s.")
- @JsonProperty("group_duration")
+ @JsonProperty(value = "group_duration", defaultValue = DEFAULT_GROUP_DURATION_SECONDS + "s")
private Duration groupDuration = Duration.ofSeconds(DEFAULT_GROUP_DURATION_SECONDS);
@JsonPropertyDescription("When local_mode
is set to true, the aggregation is performed locally on each node instead of forwarding events to a specific node based on the identification_keys
using a hash function. Default is false.")
diff --git a/data-prepper-plugins/aggregate-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/aggregate/actions/CountAggregateActionConfig.java b/data-prepper-plugins/aggregate-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/aggregate/actions/CountAggregateActionConfig.java
index d1011f4145..7097e1c85e 100644
--- a/data-prepper-plugins/aggregate-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/aggregate/actions/CountAggregateActionConfig.java
+++ b/data-prepper-plugins/aggregate-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/aggregate/actions/CountAggregateActionConfig.java
@@ -23,26 +23,26 @@ public class CountAggregateActionConfig {
@JsonPropertyDescription("Format of the aggregated event. Specifying otel_metrics
outputs aggregate events in OTel metrics SUM type with count as value. " +
"Specifying raw
outputs aggregate events as with the count_key
field as a count value and includes the start_time_key
and end_time_key
keys.")
- @JsonProperty("output_format")
+ @JsonProperty(value = "output_format", defaultValue = "otel_metrics")
OutputFormat outputFormat = OutputFormat.OTEL_METRICS;
@JsonPropertyDescription("Metric name to be used when the OTel metrics format is used. The default value is count
.")
- @JsonProperty("metric_name")
+ @JsonProperty(value = "metric_name", defaultValue = SUM_METRIC_NAME)
String metricName = SUM_METRIC_NAME;
@JsonPropertyDescription("The key in the aggregate event that will have the count value. " +
"This is the count of events in the aggregation. Default name is aggr._count
.")
- @JsonProperty("count_key")
+ @JsonProperty(value = "count_key", defaultValue = DEFAULT_COUNT_KEY)
String countKey = DEFAULT_COUNT_KEY;
@JsonPropertyDescription("The key in the aggregate event that will have the start time of the aggregation. " +
"Default name is aggr._start_time
.")
- @JsonProperty("start_time_key")
+ @JsonProperty(value = "start_time_key", defaultValue = DEFAULT_START_TIME_KEY)
String startTimeKey = DEFAULT_START_TIME_KEY;
@JsonPropertyDescription("The key in the aggregate event that will have the end time of the aggregation. " +
"Default name is aggr._end_time
.")
- @JsonProperty("end_time_key")
+ @JsonProperty(value = "end_time_key", defaultValue = DEFAULT_END_TIME_KEY)
String endTimeKey = DEFAULT_END_TIME_KEY;
@JsonPropertyDescription("List of unique keys to count.")
diff --git a/data-prepper-plugins/aggregate-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/aggregate/actions/HistogramAggregateActionConfig.java b/data-prepper-plugins/aggregate-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/aggregate/actions/HistogramAggregateActionConfig.java
index 11dafd7626..af18dd6162 100644
--- a/data-prepper-plugins/aggregate-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/aggregate/actions/HistogramAggregateActionConfig.java
+++ b/data-prepper-plugins/aggregate-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/aggregate/actions/HistogramAggregateActionConfig.java
@@ -39,7 +39,7 @@ public class HistogramAggregateActionConfig {
String key;
@JsonPropertyDescription("Format of the aggregated event. otel_metrics is the default output format which outputs in OTel metrics SUM type with count as value. Other options is - raw - which generates a JSON object with the count_key field as a count value and the start_time_key field with aggregation start time as value.")
- @JsonProperty("output_format")
+ @JsonProperty(value = "output_format", defaultValue = "otel_metrics")
OutputFormat outputFormat = OutputFormat.OTEL_METRICS;
@JsonPropertyDescription("The name of units for the values in the key. For example, bytes, traces etc")
@@ -48,11 +48,11 @@ public class HistogramAggregateActionConfig {
String units;
@JsonPropertyDescription("Metric name to be used when otel format is used.")
- @JsonProperty("metric_name")
+ @JsonProperty(value = "metric_name", defaultValue = HISTOGRAM_METRIC_NAME)
String metricName = HISTOGRAM_METRIC_NAME;
@JsonPropertyDescription("Key prefix used by all the fields created in the aggregated event. Having a prefix ensures that the names of the histogram event do not conflict with the field names in the event.")
- @JsonProperty("generated_key_prefix")
+ @JsonProperty(value = "generated_key_prefix", defaultValue = DEFAULT_GENERATED_KEY_PREFIX)
String generatedKeyPrefix = DEFAULT_GENERATED_KEY_PREFIX;
@JsonPropertyDescription("A list of buckets (values of type double) indicating the buckets in the histogram.")
diff --git a/data-prepper-plugins/aggregate-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/aggregate/actions/RateLimiterAggregateActionConfig.java b/data-prepper-plugins/aggregate-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/aggregate/actions/RateLimiterAggregateActionConfig.java
index 21eca83090..32c02d687c 100644
--- a/data-prepper-plugins/aggregate-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/aggregate/actions/RateLimiterAggregateActionConfig.java
+++ b/data-prepper-plugins/aggregate-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/aggregate/actions/RateLimiterAggregateActionConfig.java
@@ -23,7 +23,7 @@ public class RateLimiterAggregateActionConfig {
@JsonPropertyDescription("Indicates what action the rate_limiter
takes when the number of events received is greater than the number of events allowed per second. " +
"Default value is block, which blocks the processor from running after the maximum number of events allowed per second is reached until the next second. Alternatively, the drop option drops the excess events received in that second. Default is block")
- @JsonProperty("when_exceeds")
+ @JsonProperty(value = "when_exceeds", defaultValue = "block")
RateLimiterMode whenExceedsMode = RateLimiterMode.BLOCK;
public int getEventsPerSecond() {
diff --git a/data-prepper-plugins/csv-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/csv/CsvProcessorConfig.java b/data-prepper-plugins/csv-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/csv/CsvProcessorConfig.java
index 4f4b38dec0..3cb0d699e1 100644
--- a/data-prepper-plugins/csv-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/csv/CsvProcessorConfig.java
+++ b/data-prepper-plugins/csv-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/csv/CsvProcessorConfig.java
@@ -26,12 +26,12 @@ public class CsvProcessorConfig {
static final String DEFAULT_QUOTE_CHARACTER = "\""; // double quote
static final Boolean DEFAULT_DELETE_HEADERS = true;
- @JsonProperty("source")
+ @JsonProperty(value = "source", defaultValue = DEFAULT_SOURCE)
@JsonPropertyDescription("The field in the event that will be parsed. Default value is message
.")
@NotBlank
private String source = DEFAULT_SOURCE;
- @JsonProperty("delimiter")
+ @JsonProperty(value = "delimiter", defaultValue = DEFAULT_DELIMITER)
@JsonPropertyDescription("The character separating each column. Default value is ,
.")
private String delimiter = DEFAULT_DELIMITER;
@@ -40,7 +40,7 @@ public class CsvProcessorConfig {
"is parsed. If there is no event header, no action is taken. Default value is true.")
private Boolean deleteHeader = DEFAULT_DELETE_HEADERS;
- @JsonProperty("quote_character")
+ @JsonProperty(value = "quote_character", defaultValue = DEFAULT_QUOTE_CHARACTER)
@JsonPropertyDescription("The character used as a text qualifier for a single column of data. " +
"Default value is \"
.")
private String quoteCharacter = DEFAULT_QUOTE_CHARACTER;
diff --git a/data-prepper-plugins/date-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/date/DateProcessorConfig.java b/data-prepper-plugins/date-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/date/DateProcessorConfig.java
index e8f11015bc..eb7a872b27 100644
--- a/data-prepper-plugins/date-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/date/DateProcessorConfig.java
+++ b/data-prepper-plugins/date-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/date/DateProcessorConfig.java
@@ -118,9 +118,8 @@ public static boolean isValidPattern(final String pattern) {
"Can be used with both match
and from_time_received
. Default is @timestamp
.")
private String destination = DEFAULT_DESTINATION;
- @JsonProperty("output_format")
- @JsonPropertyDescription("Determines the format of the timestamp added to an event. " +
- "Default is yyyy-MM-dd'T'HH:mm:ss.SSSXXX
.")
+ @JsonProperty(value = "output_format", defaultValue = DEFAULT_OUTPUT_FORMAT)
+ @JsonPropertyDescription("Determines the format of the timestamp added to an event.")
private String outputFormat = DEFAULT_OUTPUT_FORMAT;
@JsonProperty("to_origination_metadata")
diff --git a/data-prepper-plugins/drop-events-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/drop/DropEventProcessorConfig.java b/data-prepper-plugins/drop-events-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/drop/DropEventProcessorConfig.java
index 7674675e8b..b36193eb19 100644
--- a/data-prepper-plugins/drop-events-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/drop/DropEventProcessorConfig.java
+++ b/data-prepper-plugins/drop-events-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/drop/DropEventProcessorConfig.java
@@ -23,7 +23,7 @@ public class DropEventProcessorConfig {
private String dropWhen;
@JsonPropertyDescription("Specifies how exceptions are handled when an exception occurs while evaluating an event. Default value is skip
, which drops the event so that it is not sent to further processors or sinks.")
- @JsonProperty("handle_failed_events")
+ @JsonProperty(value = "handle_failed_events", defaultValue = "skip")
private HandleFailedEventsOption handleFailedEventsOption = HandleFailedEventsOption.SKIP;
public String getDropWhen() {
diff --git a/data-prepper-plugins/geoip-processor/src/main/java/org/opensearch/dataprepper/plugins/geoip/processor/EntryConfig.java b/data-prepper-plugins/geoip-processor/src/main/java/org/opensearch/dataprepper/plugins/geoip/processor/EntryConfig.java
index d6763eb512..19950c79e9 100644
--- a/data-prepper-plugins/geoip-processor/src/main/java/org/opensearch/dataprepper/plugins/geoip/processor/EntryConfig.java
+++ b/data-prepper-plugins/geoip-processor/src/main/java/org/opensearch/dataprepper/plugins/geoip/processor/EntryConfig.java
@@ -27,8 +27,8 @@ public class EntryConfig {
@NotEmpty
private String source;
- @JsonPropertyDescription("The key of the target field in which to set the geolocation data. Default is geo
.")
- @JsonProperty("target")
+ @JsonPropertyDescription("The key of the target field in which to set the geolocation data.")
+ @JsonProperty(value = "target", defaultValue = DEFAULT_TARGET)
private String target = DEFAULT_TARGET;
@JsonPropertyDescription("The list of geolocation fields to include in the target object. By default, this is all the fields provided by the configured databases. " +
diff --git a/data-prepper-plugins/grok-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/grok/GrokProcessorConfig.java b/data-prepper-plugins/grok-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/grok/GrokProcessorConfig.java
index fb61e85a47..5a5fee6095 100644
--- a/data-prepper-plugins/grok-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/grok/GrokProcessorConfig.java
+++ b/data-prepper-plugins/grok-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/grok/GrokProcessorConfig.java
@@ -93,7 +93,7 @@ public class GrokProcessorConfig {
"pattern_directories
. Default is *
.")
private String patternsFilesGlob = DEFAULT_PATTERNS_FILES_GLOB;
- @JsonProperty(TIMEOUT_MILLIS)
+ @JsonProperty(value = TIMEOUT_MILLIS, defaultValue = "30000")
@JsonPropertyDescription("The maximum amount of time during which matching occurs. " +
"Setting to 0
prevents any matching from occurring. Default is 30000
.")
private int timeoutMillis = DEFAULT_TIMEOUT_MILLIS;
diff --git a/data-prepper-plugins/key-value-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/keyvalue/KeyValueProcessorConfig.java b/data-prepper-plugins/key-value-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/keyvalue/KeyValueProcessorConfig.java
index 505d582755..0fee45c4a6 100644
--- a/data-prepper-plugins/key-value-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/keyvalue/KeyValueProcessorConfig.java
+++ b/data-prepper-plugins/key-value-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/keyvalue/KeyValueProcessorConfig.java
@@ -35,12 +35,13 @@ public class KeyValueProcessorConfig {
@JsonPropertyDescription("The source field to parse for key-value pairs. The default value is message
.")
private String source = DEFAULT_SOURCE;
+ @JsonProperty(defaultValue = DEFAULT_DESTINATION)
@JsonPropertyDescription("The destination field for the structured data. The destination will be a structured map with the key value pairs extracted from the source. " +
"If destination
is set to null
, the parsed fields will be written to the root of the event. " +
"The default value is parsed_message
.")
private String destination = DEFAULT_DESTINATION;
- @JsonProperty("field_split_characters")
+ @JsonProperty(value = "field_split_characters", defaultValue = DEFAULT_FIELD_SPLIT_CHARACTERS)
@JsonPropertyDescription("A string of characters specifying the delimiter that separates key-value pairs. " +
"Special regular expression characters such as [
and ]
must be escaped with \\\\
. " +
"This field cannot be defined along with field_delimiter_regex
. " +
@@ -55,7 +56,7 @@ public class KeyValueProcessorConfig {
"If this option is not defined, the key_value
processor will parse the source using field_split_characters
.")
private String fieldDelimiterRegex;
- @JsonProperty("value_split_characters")
+ @JsonProperty(value = "value_split_characters", defaultValue = DEFAULT_VALUE_SPLIT_CHARACTERS)
@JsonPropertyDescription("A string of characters specifying the delimiter that separates keys from their values within a key-value pair. " +
"Special regular expression characters such as [
and ]
must be escaped with \\\\
. " +
"This field cannot be defined along with key_value_delimiter_regex
. " +
@@ -137,7 +138,7 @@ public class KeyValueProcessorConfig {
"The default configuration is false
which retains those grouping characters.")
private boolean removeBrackets;
- @JsonProperty("value_grouping")
+ @JsonProperty(value = "value_grouping", defaultValue = "false")
@JsonPropertyDescription("Specifies whether to group values using predefined grouping delimiters. " +
"If this flag is enabled, then the content between the delimiters is considered to be one entity and " +
"they are not parsed as key-value pairs. The following characters are used a group delimiters: " +
@@ -163,13 +164,13 @@ public class KeyValueProcessorConfig {
"when writing parsed fields to the event. Default is true
.")
private boolean overwriteIfDestinationExists = true;
- @JsonProperty("drop_keys_with_no_value")
+ @JsonProperty(value = "drop_keys_with_no_value", defaultValue = "false")
@JsonPropertyDescription("Specifies whether keys should be dropped if they have a null value. Default is false
. " +
"For example, if drop_keys_with_no_value
is set to true
, " +
"then {\"key1=value1&key2\"}
parses to {\"key1\": \"value1\"}
.")
private boolean dropKeysWithNoValue = false;
- @JsonProperty("strict_grouping")
+ @JsonProperty(value = "strict_grouping", defaultValue = "false")
@JsonPropertyDescription("When enabled, groups with unmatched end characters yield errors. " +
"The event is ignored after the errors are logged. " +
"Specifies whether strict grouping should be enabled when the value_grouping
" +
diff --git a/data-prepper-plugins/mutate-event-processors/src/main/java/org/opensearch/dataprepper/plugins/processor/mutateevent/ConvertEntryTypeProcessorConfig.java b/data-prepper-plugins/mutate-event-processors/src/main/java/org/opensearch/dataprepper/plugins/processor/mutateevent/ConvertEntryTypeProcessorConfig.java
index 80763f2b83..e80a13d291 100644
--- a/data-prepper-plugins/mutate-event-processors/src/main/java/org/opensearch/dataprepper/plugins/processor/mutateevent/ConvertEntryTypeProcessorConfig.java
+++ b/data-prepper-plugins/mutate-event-processors/src/main/java/org/opensearch/dataprepper/plugins/processor/mutateevent/ConvertEntryTypeProcessorConfig.java
@@ -26,8 +26,8 @@ public class ConvertEntryTypeProcessorConfig implements ConverterArguments {
@JsonPropertyDescription("List of keys whose values needs to be converted to a different type.")
private List keys;
- @JsonProperty("type")
- @JsonPropertyDescription("Target type for the values. Default value is integer.
")
+ @JsonProperty(value = "type", defaultValue = "integer")
+ @JsonPropertyDescription("Target type for the values. Default value is integer
.")
private TargetType type = TargetType.INTEGER;
@JsonProperty("null_values")
@@ -37,7 +37,7 @@ public class ConvertEntryTypeProcessorConfig implements ConverterArguments {
/**
* Optional scale value used only in the case of BigDecimal converter
*/
- @JsonProperty("scale")
+ @JsonProperty(value = "scale", defaultValue = "0")
@JsonPropertyDescription("Modifies the scale of the big_decimal
when converting to a big_decimal
. The default value is 0.")
private int scale = 0;
diff --git a/data-prepper-plugins/mutate-event-processors/src/main/java/org/opensearch/dataprepper/plugins/processor/mutateevent/ListToMapProcessorConfig.java b/data-prepper-plugins/mutate-event-processors/src/main/java/org/opensearch/dataprepper/plugins/processor/mutateevent/ListToMapProcessorConfig.java
index 3f091793fd..943a3aca41 100644
--- a/data-prepper-plugins/mutate-event-processors/src/main/java/org/opensearch/dataprepper/plugins/processor/mutateevent/ListToMapProcessorConfig.java
+++ b/data-prepper-plugins/mutate-event-processors/src/main/java/org/opensearch/dataprepper/plugins/processor/mutateevent/ListToMapProcessorConfig.java
@@ -91,7 +91,7 @@ public String getOptionValue() {
private boolean flatten = false;
@NotNull
- @JsonProperty("flattened_element")
+ @JsonProperty(value = "flattened_element", defaultValue = "first")
@JsonPropertyDescription("The element to keep, either first
or last
, when flatten
is set to true
.")
private FlattenedElement flattenedElement = FlattenedElement.FIRST;
diff --git a/data-prepper-plugins/mutate-event-processors/src/main/java/org/opensearch/dataprepper/plugins/processor/mutateevent/MapToListProcessorConfig.java b/data-prepper-plugins/mutate-event-processors/src/main/java/org/opensearch/dataprepper/plugins/processor/mutateevent/MapToListProcessorConfig.java
index 70f1ae4f3c..697a873e35 100644
--- a/data-prepper-plugins/mutate-event-processors/src/main/java/org/opensearch/dataprepper/plugins/processor/mutateevent/MapToListProcessorConfig.java
+++ b/data-prepper-plugins/mutate-event-processors/src/main/java/org/opensearch/dataprepper/plugins/processor/mutateevent/MapToListProcessorConfig.java
@@ -36,11 +36,11 @@ public class MapToListProcessorConfig {
@JsonPropertyDescription("The target for the generated list.")
private String target;
- @JsonProperty("key_name")
+ @JsonProperty(value = "key_name", defaultValue = DEFAULT_KEY_NAME)
@JsonPropertyDescription("The name of the field in which to store the original key. Default is key
.")
private String keyName = DEFAULT_KEY_NAME;
- @JsonProperty("value_name")
+ @JsonProperty(value = "value_name", defaultValue = DEFAULT_VALUE_NAME)
@JsonPropertyDescription("The name of the field in which to store the original value. Default is value
.")
private String valueName = DEFAULT_VALUE_NAME;
diff --git a/data-prepper-plugins/obfuscate-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/obfuscation/action/MaskActionConfig.java b/data-prepper-plugins/obfuscate-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/obfuscation/action/MaskActionConfig.java
index 809f28397e..ea38c39fc9 100644
--- a/data-prepper-plugins/obfuscate-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/obfuscation/action/MaskActionConfig.java
+++ b/data-prepper-plugins/obfuscate-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/obfuscation/action/MaskActionConfig.java
@@ -16,17 +16,19 @@
@JsonClassDescription("Obfuscates data by masking data. Without any configuration this will replace text with ***
")
@JsonPropertyOrder
public class MaskActionConfig {
+ private static final String DEFAULT_MASK_CHARACTER = "*";
+ private static final int DEFAULT_MASK_LENGTH = 3;
- @JsonProperty("mask_character")
+ @JsonProperty(value = "mask_character", defaultValue = DEFAULT_MASK_CHARACTER)
@Pattern(regexp = "[*#!%&@]", message = "Valid characters are *, #, $, %, &, ! and @")
@JsonPropertyDescription("The character to use to mask text. By default, this is *
")
- private String maskCharacter = "*";
+ private String maskCharacter = DEFAULT_MASK_CHARACTER;
- @JsonProperty("mask_character_length")
+ @JsonProperty(value = "mask_character_length", defaultValue = "" + DEFAULT_MASK_LENGTH)
@Min(1)
@Max(10)
@JsonPropertyDescription("The length of the character mask to apply. By default, this is three characters.")
- private int maskCharacterLength = 3;
+ private int maskCharacterLength = DEFAULT_MASK_LENGTH;
public MaskActionConfig() {
}
diff --git a/data-prepper-plugins/obfuscate-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/obfuscation/action/OneWayHashActionConfig.java b/data-prepper-plugins/obfuscate-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/obfuscation/action/OneWayHashActionConfig.java
index 9e2fd64988..a63f810772 100644
--- a/data-prepper-plugins/obfuscate-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/obfuscation/action/OneWayHashActionConfig.java
+++ b/data-prepper-plugins/obfuscate-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/obfuscation/action/OneWayHashActionConfig.java
@@ -22,6 +22,7 @@
@JsonPropertyOrder
public class OneWayHashActionConfig {
+ public static final String DEFAULT_FORMAT = "SHA-512";
@JsonProperty("salt")
@JsonPropertyDescription("Salt value to use when generating hash. If not specified, salt will be randomly generated by the processor.")
@Size(min = 16, message = "Minimum size of salt string is 16.")
@@ -34,10 +35,10 @@ public class OneWayHashActionConfig {
@EventKeyConfiguration(EventKeyFactory.EventAction.GET)
private EventKey saltKey;
- @JsonProperty("format")
- @Pattern(regexp = "SHA-512", message = "Valid values: SHA-512
")
+ @JsonProperty(value = "format", defaultValue = DEFAULT_FORMAT)
+ @Pattern(regexp = DEFAULT_FORMAT, message = "Valid values: SHA-512
")
@JsonPropertyDescription("Format of one way hash to generate. Default to SHA-512
.")
- private String format = "SHA-512";
+ private String format = DEFAULT_FORMAT;
public OneWayHashActionConfig(){
diff --git a/data-prepper-plugins/otel-metrics-raw-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/otelmetrics/OtelMetricsRawProcessorConfig.java b/data-prepper-plugins/otel-metrics-raw-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/otelmetrics/OtelMetricsRawProcessorConfig.java
index d2c6b4a3ad..8b42ba2abf 100644
--- a/data-prepper-plugins/otel-metrics-raw-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/otelmetrics/OtelMetricsRawProcessorConfig.java
+++ b/data-prepper-plugins/otel-metrics-raw-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/otelmetrics/OtelMetricsRawProcessorConfig.java
@@ -29,6 +29,7 @@ public class OtelMetricsRawProcessorConfig {
@JsonPropertyDescription("Whether or not to calculate exponential histogram buckets. Default value is true
.")
private Boolean calculateExponentialHistogramBuckets = true;
+ @JsonProperty(defaultValue = "" + DEFAULT_EXPONENTIAL_HISTOGRAM_MAX_ALLOWED_SCALE)
@JsonPropertyDescription("Maximum allowed scale in exponential histogram calculation. By default, the maximum allowed scale is 10
.")
private Integer exponentialHistogramMaxAllowedScale = DEFAULT_EXPONENTIAL_HISTOGRAM_MAX_ALLOWED_SCALE;
diff --git a/data-prepper-plugins/otel-proto-common/src/main/java/org/opensearch/dataprepper/plugins/otel/codec/OTelLogsInputCodecConfig.java b/data-prepper-plugins/otel-proto-common/src/main/java/org/opensearch/dataprepper/plugins/otel/codec/OTelLogsInputCodecConfig.java
index d3267d3e76..13ff2de8a8 100644
--- a/data-prepper-plugins/otel-proto-common/src/main/java/org/opensearch/dataprepper/plugins/otel/codec/OTelLogsInputCodecConfig.java
+++ b/data-prepper-plugins/otel-proto-common/src/main/java/org/opensearch/dataprepper/plugins/otel/codec/OTelLogsInputCodecConfig.java
@@ -20,8 +20,8 @@
public class OTelLogsInputCodecConfig {
static final OTelLogsFormatOption DEFAULT_FORMAT = OTelLogsFormatOption.JSON;
- @JsonProperty("format")
- @JsonPropertyDescription("Specifies the format of the OTel logs. Default is json
.")
+ @JsonProperty(value = "format", defaultValue = "json")
+ @JsonPropertyDescription("Specifies the format of the OTel logs.")
@NotNull
private OTelLogsFormatOption format = DEFAULT_FORMAT;
diff --git a/data-prepper-plugins/otel-trace-raw-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/oteltrace/OtelTraceRawProcessorConfig.java b/data-prepper-plugins/otel-trace-raw-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/oteltrace/OtelTraceRawProcessorConfig.java
index 81d38506fd..e7217968f2 100644
--- a/data-prepper-plugins/otel-trace-raw-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/oteltrace/OtelTraceRawProcessorConfig.java
+++ b/data-prepper-plugins/otel-trace-raw-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/oteltrace/OtelTraceRawProcessorConfig.java
@@ -20,18 +20,18 @@ public class OtelTraceRawProcessorConfig {
static final Duration DEFAULT_TRACE_ID_TTL = Duration.ofSeconds(15L);
static final long MAX_TRACE_ID_CACHE_SIZE = 1_000_000L;
- @JsonProperty("trace_flush_interval")
+ @JsonProperty(value = "trace_flush_interval", defaultValue = "180")
@JsonPropertyDescription("Represents the time interval in seconds to flush all the descendant spans without any " +
"root span. Default is 180
.")
private long traceFlushInterval = DEFAULT_TG_FLUSH_INTERVAL_SEC;
- @JsonProperty("trace_group_cache_ttl")
+ @JsonProperty(value = "trace_group_cache_ttl", defaultValue = "PT15S")
@JsonPropertyDescription("Represents the time-to-live to cache a trace group details. " +
"The value may be an ISO 8601 notation such as PT1M30S
or a duration and unit such as 45s
. " +
"Default is 15 seconds.")
private Duration traceGroupCacheTimeToLive = DEFAULT_TRACE_ID_TTL;
- @JsonProperty("trace_group_cache_max_size")
+ @JsonProperty(value = "trace_group_cache_max_size", defaultValue = "1000000")
@JsonPropertyDescription("Represents the maximum size of the cache to store the trace group details from root spans. " +
"Default is 1000000
.")
private long traceGroupCacheMaxSize = MAX_TRACE_ID_CACHE_SIZE;
diff --git a/data-prepper-plugins/parse-json-processor/src/main/java/org/opensearch/dataprepper/plugins/codec/json/JsonOutputCodecConfig.java b/data-prepper-plugins/parse-json-processor/src/main/java/org/opensearch/dataprepper/plugins/codec/json/JsonOutputCodecConfig.java
index 8d8ba865d6..c4597c0763 100644
--- a/data-prepper-plugins/parse-json-processor/src/main/java/org/opensearch/dataprepper/plugins/codec/json/JsonOutputCodecConfig.java
+++ b/data-prepper-plugins/parse-json-processor/src/main/java/org/opensearch/dataprepper/plugins/codec/json/JsonOutputCodecConfig.java
@@ -10,7 +10,7 @@
public class JsonOutputCodecConfig {
static final String DEFAULT_KEY_NAME = "events";
- @JsonProperty("key_name")
+ @JsonProperty(value = "key_name", defaultValue = DEFAULT_KEY_NAME)
@Size(min = 1, max = 2048)
private String keyName = DEFAULT_KEY_NAME;
diff --git a/data-prepper-plugins/parse-json-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/parse/ion/ParseIonProcessorConfig.java b/data-prepper-plugins/parse-json-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/parse/ion/ParseIonProcessorConfig.java
index b4b7fae071..ee866b08a8 100644
--- a/data-prepper-plugins/parse-json-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/parse/ion/ParseIonProcessorConfig.java
+++ b/data-prepper-plugins/parse-json-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/parse/ion/ParseIonProcessorConfig.java
@@ -27,7 +27,7 @@ public class ParseIonProcessorConfig implements CommonParseConfig {
static final String DEFAULT_SOURCE = "message";
@NotBlank
- @JsonProperty("source")
+ @JsonProperty(value = "source", defaultValue = DEFAULT_SOURCE)
@JsonPropertyDescription("The field in the event that will be parsed. The default value is message
.")
private String source = DEFAULT_SOURCE;
@@ -57,15 +57,14 @@ public class ParseIonProcessorConfig implements CommonParseConfig {
@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.")
private String parseWhen;
- @JsonProperty("handle_failed_events")
+ @JsonProperty(value = "handle_failed_events", defaultValue = "skip")
@JsonPropertyDescription("Determines how to handle events with ION processing errors. Options include 'skip', " +
"which will log the error and send the event downstream to the next processor, and 'skip_silently', " +
- "which will send the Event downstream to the next processor without logging the error. " +
- "Default is 'skip'.")
+ "which will send the Event downstream to the next processor without logging the error. ")
@NotNull
private HandleFailedEventsOption handleFailedEventsOption = HandleFailedEventsOption.SKIP;
- @JsonProperty("depth")
+ @JsonProperty(value = "depth", defaultValue = "0")
@Min(0)
@Max(10)
@JsonPropertyDescription("Indicates the depth at which the nested values of the event are not parsed any more. Default is 0, which means all levels of nested values are parsed. If the depth is 1, only the top level keys are parsed and all its nested values are represented as strings")
diff --git a/data-prepper-plugins/parse-json-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/parse/json/ParseJsonProcessorConfig.java b/data-prepper-plugins/parse-json-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/parse/json/ParseJsonProcessorConfig.java
index be56a808dc..e450ac1cb0 100644
--- a/data-prepper-plugins/parse-json-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/parse/json/ParseJsonProcessorConfig.java
+++ b/data-prepper-plugins/parse-json-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/parse/json/ParseJsonProcessorConfig.java
@@ -27,7 +27,7 @@ public class ParseJsonProcessorConfig implements CommonParseConfig {
static final String DEFAULT_SOURCE = "message";
@NotBlank
- @JsonProperty("source")
+ @JsonProperty(value = "source", defaultValue = DEFAULT_SOURCE)
@JsonPropertyDescription("The field in the event that will be parsed. The default value is message
.")
private String source = DEFAULT_SOURCE;
@@ -36,7 +36,7 @@ public class ParseJsonProcessorConfig implements CommonParseConfig {
@JsonPropertyDescription("The destination field of the structured object from the parsed JSON. Defaults to the root of the event. Cannot be an empty string, /
, or any whitespace-only string because these are not valid event fields.")
private String destination;
- @JsonProperty("depth")
+ @JsonProperty(value = "depth", defaultValue = "0")
@Min(0)
@Max(10)
@JsonPropertyDescription("Indicates the depth at which the nested values of the event are not parsed any more. Default is 0, which means all levels of nested values are parsed. If the depth is 1, only the top level keys are parsed and all its nested values are represented as strings")
diff --git a/data-prepper-plugins/parse-json-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/parse/xml/ParseXmlProcessorConfig.java b/data-prepper-plugins/parse-json-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/parse/xml/ParseXmlProcessorConfig.java
index 94e5ea3fbc..4d1e0011b2 100644
--- a/data-prepper-plugins/parse-json-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/parse/xml/ParseXmlProcessorConfig.java
+++ b/data-prepper-plugins/parse-json-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/parse/xml/ParseXmlProcessorConfig.java
@@ -20,7 +20,7 @@ public class ParseXmlProcessorConfig implements CommonParseConfig {
static final String DEFAULT_SOURCE = "message";
@NotBlank
- @JsonProperty("source")
+ @JsonProperty(value = "source", defaultValue = DEFAULT_SOURCE)
@JsonPropertyDescription("The field in the event that will be parsed. The default value is message
.")
private String source = DEFAULT_SOURCE;
diff --git a/data-prepper-plugins/service-map-stateful/src/main/java/org/opensearch/dataprepper/plugins/processor/ServiceMapProcessorConfig.java b/data-prepper-plugins/service-map-stateful/src/main/java/org/opensearch/dataprepper/plugins/processor/ServiceMapProcessorConfig.java
index 49aae094d9..6d44f11b5c 100644
--- a/data-prepper-plugins/service-map-stateful/src/main/java/org/opensearch/dataprepper/plugins/processor/ServiceMapProcessorConfig.java
+++ b/data-prepper-plugins/service-map-stateful/src/main/java/org/opensearch/dataprepper/plugins/processor/ServiceMapProcessorConfig.java
@@ -20,15 +20,15 @@ public class ServiceMapProcessorConfig {
static final String DEFAULT_DB_PATH = "data/service-map/";
static final String DB_PATH = "db_path";
- @JsonProperty(WINDOW_DURATION)
+ @JsonProperty(value = WINDOW_DURATION, defaultValue = "" + DEFAULT_WINDOW_DURATION)
@JsonPropertyDescription("Represents the fixed time window, in seconds, " +
- "during which service map relationships are evaluated. Default value is 180
.")
+ "during which service map relationships are evaluated.")
private int windowDuration = DEFAULT_WINDOW_DURATION;
@NotEmpty
- @JsonProperty(DB_PATH)
+ @JsonProperty(value = DB_PATH, defaultValue = DEFAULT_DB_PATH)
@JsonPropertyDescription("Represents folder path for creating database files storing transient data off heap memory" +
- "when processing service-map data. Default value is data/service-map/
")
+ "when processing service-map data.")
private String dbPath = DEFAULT_DB_PATH;
public int getWindowDuration() {
diff --git a/data-prepper-plugins/translate-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/translate/TargetsParameterConfig.java b/data-prepper-plugins/translate-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/translate/TargetsParameterConfig.java
index 2c6d30271f..8bb44c9869 100644
--- a/data-prepper-plugins/translate-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/translate/TargetsParameterConfig.java
+++ b/data-prepper-plugins/translate-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/translate/TargetsParameterConfig.java
@@ -43,7 +43,8 @@ public class TargetsParameterConfig {
@JsonProperty("default")
@JsonPropertyDescription("The default value to use when no match is found during translation.")
private String defaultValue;
- @JsonProperty("type")
+
+ @JsonProperty(value = "type", defaultValue = "string")
@JsonPropertyDescription("Specifies the data type for the target value.")
private TargetType targetType = TargetType.STRING;
diff --git a/data-prepper-plugins/truncate-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/truncate/TruncateProcessorConfig.java b/data-prepper-plugins/truncate-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/truncate/TruncateProcessorConfig.java
index debbbd3586..0b7f263b65 100644
--- a/data-prepper-plugins/truncate-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/truncate/TruncateProcessorConfig.java
+++ b/data-prepper-plugins/truncate-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/truncate/TruncateProcessorConfig.java
@@ -26,7 +26,7 @@ public static class Entry {
"The default value is an empty list, which indicates that all values will be truncated.")
private List sourceKeys;
- @JsonProperty("start_at")
+ @JsonProperty(value = "start_at", defaultValue = "0")
@JsonPropertyDescription("The index into the string value to start truncation. " +
"Default is 0
, which specifies to start truncation at the beginning of each key's value.")
private Integer startAt;
diff --git a/data-prepper-plugins/user-agent-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/useragent/UserAgentProcessorConfig.java b/data-prepper-plugins/user-agent-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/useragent/UserAgentProcessorConfig.java
index b985d585e6..9ab8219b0f 100644
--- a/data-prepper-plugins/user-agent-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/useragent/UserAgentProcessorConfig.java
+++ b/data-prepper-plugins/user-agent-processor/src/main/java/org/opensearch/dataprepper/plugins/processor/useragent/UserAgentProcessorConfig.java
@@ -32,7 +32,7 @@ public class UserAgentProcessorConfig {
private EventKey source;
@NotNull
- @JsonProperty("target")
+ @JsonProperty(value = "target", defaultValue = "user_agent")
@JsonPropertyDescription("The field to which the parsed event will write. Default is user_agent
.")
private String target = "user_agent";
@@ -41,7 +41,7 @@ public class UserAgentProcessorConfig {
@JsonPropertyDescription("Determines whether to exclude the original UA string from the parsing result. Defaults to false
.")
private boolean excludeOriginal = false;
- @JsonProperty("cache_size")
+ @JsonProperty(value = "cache_size", defaultValue = "1000")
@JsonPropertyDescription("The cache size of the parser in megabytes. Defaults to 1000
.")
private int cacheSize = DEFAULT_CACHE_SIZE;