Skip to content

OP make 'support_rules' field in parse_grok processor optional #3017

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .generated-info
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"spec_repo_commit": "a6f5281",
"generated": "2025-08-06 17:44:35.840"
"spec_repo_commit": "befda92",
"generated": "2025-08-06 19:12:57.307"
}
1 change: 0 additions & 1 deletion .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28224,7 +28224,6 @@ components:
required:
- source
- match_rules
- support_rules
type: object
ObservabilityPipelineParseGrokProcessorRuleMatchRule:
description: 'Defines a Grok parsing rule, which extracts structured fields
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,17 @@ public class ObservabilityPipelineParseGrokProcessorRule {
private String source;

public static final String JSON_PROPERTY_SUPPORT_RULES = "support_rules";
private List<ObservabilityPipelineParseGrokProcessorRuleSupportRule> supportRules =
new ArrayList<>();
private List<ObservabilityPipelineParseGrokProcessorRuleSupportRule> supportRules = null;

public ObservabilityPipelineParseGrokProcessorRule() {}

@JsonCreator
public ObservabilityPipelineParseGrokProcessorRule(
@JsonProperty(required = true, value = JSON_PROPERTY_MATCH_RULES)
List<ObservabilityPipelineParseGrokProcessorRuleMatchRule> matchRules,
@JsonProperty(required = true, value = JSON_PROPERTY_SOURCE) String source,
@JsonProperty(required = true, value = JSON_PROPERTY_SUPPORT_RULES)
List<ObservabilityPipelineParseGrokProcessorRuleSupportRule> supportRules) {
@JsonProperty(required = true, value = JSON_PROPERTY_SOURCE) String source) {
this.matchRules = matchRules;
this.source = source;
this.supportRules = supportRules;
}

public ObservabilityPipelineParseGrokProcessorRule matchRules(
Expand Down Expand Up @@ -119,6 +115,9 @@ public ObservabilityPipelineParseGrokProcessorRule supportRules(

public ObservabilityPipelineParseGrokProcessorRule addSupportRulesItem(
ObservabilityPipelineParseGrokProcessorRuleSupportRule supportRulesItem) {
if (this.supportRules == null) {
this.supportRules = new ArrayList<>();
}
this.supportRules.add(supportRulesItem);
this.unparsed |= supportRulesItem.unparsed;
return this;
Expand All @@ -129,8 +128,9 @@ public ObservabilityPipelineParseGrokProcessorRule addSupportRulesItem(
*
* @return supportRules
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_SUPPORT_RULES)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<ObservabilityPipelineParseGrokProcessorRuleSupportRule> getSupportRules() {
return supportRules;
}
Expand Down