Skip to content
Open
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
33 changes: 32 additions & 1 deletion .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36203,7 +36203,8 @@ components:
type: object
ObservabilityPipelineEnrichmentTableProcessor:
description: The `enrichment_table` processor enriches logs using a static CSV
file or GeoIP database.
file, GeoIP database, or reference table. Exactly one of `file`, `geoip`,
or `reference_table` must be configured.
properties:
display_name:
$ref: '#/components/schemas/ObservabilityPipelineComponentDisplayName'
Expand All @@ -36224,6 +36225,8 @@ components:
targets.
example: source:my-source
type: string
reference_table:
$ref: '#/components/schemas/ObservabilityPipelineEnrichmentTableReferenceTable'
target:
description: Path where enrichment results should be stored in the log.
example: enriched.geoip
Expand All @@ -36246,6 +36249,34 @@ components:
type: string
x-enum-varnames:
- ENRICHMENT_TABLE
ObservabilityPipelineEnrichmentTableReferenceTable:
description: Uses a Datadog reference table to enrich logs.
properties:
app_key_key:
default: PROCESSOR_ENRICHMENT_TABLES_APP_KEY
description: Environment variable name containing the application key used
for reference table authentication.
type: string
columns:
description: List of column names to include from the reference table. If
not provided, all columns are included.
items:
type: string
nullable: true
type: array
key_field:
description: Path to the field in the log event to match against the reference
table.
example: log.user.id
type: string
table_id:
description: The unique identifier of the reference table.
example: 550e8400-e29b-41d4-a716-446655440000
type: string
required:
- key_field
- table_id
type: object
ObservabilityPipelineFieldValue:
description: Represents a static key-value pair used in various processors.
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@
import java.util.Objects;

/**
* The <code>enrichment_table</code> processor enriches logs using a static CSV file or GeoIP
* database.
* The <code>enrichment_table</code> processor enriches logs using a static CSV file, GeoIP
* database, or reference table. Exactly one of <code>file</code>, <code>geoip</code>, or <code>
* reference_table</code> must be configured.
*/
@JsonPropertyOrder({
ObservabilityPipelineEnrichmentTableProcessor.JSON_PROPERTY_DISPLAY_NAME,
Expand All @@ -28,6 +29,7 @@
ObservabilityPipelineEnrichmentTableProcessor.JSON_PROPERTY_GEOIP,
ObservabilityPipelineEnrichmentTableProcessor.JSON_PROPERTY_ID,
ObservabilityPipelineEnrichmentTableProcessor.JSON_PROPERTY_INCLUDE,
ObservabilityPipelineEnrichmentTableProcessor.JSON_PROPERTY_REFERENCE_TABLE,
ObservabilityPipelineEnrichmentTableProcessor.JSON_PROPERTY_TARGET,
ObservabilityPipelineEnrichmentTableProcessor.JSON_PROPERTY_TYPE
})
Expand All @@ -53,6 +55,9 @@ public class ObservabilityPipelineEnrichmentTableProcessor {
public static final String JSON_PROPERTY_INCLUDE = "include";
private String include;

public static final String JSON_PROPERTY_REFERENCE_TABLE = "reference_table";
private ObservabilityPipelineEnrichmentTableReferenceTable referenceTable;

public static final String JSON_PROPERTY_TARGET = "target";
private String target;

Expand Down Expand Up @@ -205,6 +210,29 @@ public void setInclude(String include) {
this.include = include;
}

public ObservabilityPipelineEnrichmentTableProcessor referenceTable(
ObservabilityPipelineEnrichmentTableReferenceTable referenceTable) {
this.referenceTable = referenceTable;
this.unparsed |= referenceTable.unparsed;
return this;
}

/**
* Uses a Datadog reference table to enrich logs.
*
* @return referenceTable
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_REFERENCE_TABLE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public ObservabilityPipelineEnrichmentTableReferenceTable getReferenceTable() {
return referenceTable;
}

public void setReferenceTable(ObservabilityPipelineEnrichmentTableReferenceTable referenceTable) {
this.referenceTable = referenceTable;
}

public ObservabilityPipelineEnrichmentTableProcessor target(String target) {
this.target = target;
return this;
Expand Down Expand Up @@ -315,6 +343,8 @@ public boolean equals(Object o) {
&& Objects.equals(this.geoip, observabilityPipelineEnrichmentTableProcessor.geoip)
&& Objects.equals(this.id, observabilityPipelineEnrichmentTableProcessor.id)
&& Objects.equals(this.include, observabilityPipelineEnrichmentTableProcessor.include)
&& Objects.equals(
this.referenceTable, observabilityPipelineEnrichmentTableProcessor.referenceTable)
&& Objects.equals(this.target, observabilityPipelineEnrichmentTableProcessor.target)
&& Objects.equals(this.type, observabilityPipelineEnrichmentTableProcessor.type)
&& Objects.equals(
Expand All @@ -325,7 +355,16 @@ public boolean equals(Object o) {
@Override
public int hashCode() {
return Objects.hash(
displayName, enabled, file, geoip, id, include, target, type, additionalProperties);
displayName,
enabled,
file,
geoip,
id,
include,
referenceTable,
target,
type,
additionalProperties);
}

@Override
Expand All @@ -338,6 +377,7 @@ public String toString() {
sb.append(" geoip: ").append(toIndentedString(geoip)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" include: ").append(toIndentedString(include)).append("\n");
sb.append(" referenceTable: ").append(toIndentedString(referenceTable)).append("\n");
sb.append(" target: ").append(toIndentedString(target)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" additionalProperties: ")
Expand Down
Loading
Loading