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
7 changes: 7 additions & 0 deletions docs/datadog_api_client.v2.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15740,6 +15740,13 @@ datadog\_api\_client.v2.model.observability\_pipeline\_enrichment\_table\_proces
:members:
:show-inheritance:

datadog\_api\_client.v2.model.observability\_pipeline\_enrichment\_table\_reference\_table module
-------------------------------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.observability_pipeline_enrichment_table_reference_table
:members:
:show-inheritance:

datadog\_api\_client.v2.model.observability\_pipeline\_field\_value module
--------------------------------------------------------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ def __init__(self, **kwargs):
:param geoip: Uses a GeoIP database to enrich logs based on an IP field.
:type geoip: ObservabilityPipelineEnrichmentTableGeoIp, optional

:param reference_table: Uses a Datadog reference table to enrich logs.
:type reference_table: ObservabilityPipelineEnrichmentTableReferenceTable, optional

:param target: Path where enrichment results should be stored in the log.
:type target: str

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
from datadog_api_client.v2.model.observability_pipeline_enrichment_table_geo_ip import (
ObservabilityPipelineEnrichmentTableGeoIp,
)
from datadog_api_client.v2.model.observability_pipeline_enrichment_table_reference_table import (
ObservabilityPipelineEnrichmentTableReferenceTable,
)
from datadog_api_client.v2.model.observability_pipeline_enrichment_table_processor_type import (
ObservabilityPipelineEnrichmentTableProcessorType,
)
Expand All @@ -34,6 +37,9 @@ def openapi_types(_):
from datadog_api_client.v2.model.observability_pipeline_enrichment_table_geo_ip import (
ObservabilityPipelineEnrichmentTableGeoIp,
)
from datadog_api_client.v2.model.observability_pipeline_enrichment_table_reference_table import (
ObservabilityPipelineEnrichmentTableReferenceTable,
)
from datadog_api_client.v2.model.observability_pipeline_enrichment_table_processor_type import (
ObservabilityPipelineEnrichmentTableProcessorType,
)
Expand All @@ -45,6 +51,7 @@ def openapi_types(_):
"geoip": (ObservabilityPipelineEnrichmentTableGeoIp,),
"id": (str,),
"include": (str,),
"reference_table": (ObservabilityPipelineEnrichmentTableReferenceTable,),
"target": (str,),
"type": (ObservabilityPipelineEnrichmentTableProcessorType,),
}
Expand All @@ -56,6 +63,7 @@ def openapi_types(_):
"geoip": "geoip",
"id": "id",
"include": "include",
"reference_table": "reference_table",
"target": "target",
"type": "type",
}
Expand All @@ -70,10 +78,11 @@ def __init__(
display_name: Union[str, UnsetType] = unset,
file: Union[ObservabilityPipelineEnrichmentTableFile, UnsetType] = unset,
geoip: Union[ObservabilityPipelineEnrichmentTableGeoIp, UnsetType] = unset,
reference_table: Union[ObservabilityPipelineEnrichmentTableReferenceTable, UnsetType] = unset,
**kwargs,
):
"""
The ``enrichment_table`` processor enriches logs using a static CSV file or GeoIP database.
The ``enrichment_table`` processor enriches logs using a static CSV file, GeoIP database, or reference table. Exactly one of ``file`` , ``geoip`` , or ``reference_table`` must be configured.

:param display_name: The display name for a component.
:type display_name: str, optional
Expand All @@ -93,6 +102,9 @@ def __init__(
:param include: A Datadog search query used to determine which logs this processor targets.
:type include: str

:param reference_table: Uses a Datadog reference table to enrich logs.
:type reference_table: ObservabilityPipelineEnrichmentTableReferenceTable, optional

:param target: Path where enrichment results should be stored in the log.
:type target: str

Expand All @@ -105,6 +117,8 @@ def __init__(
kwargs["file"] = file
if geoip is not unset:
kwargs["geoip"] = geoip
if reference_table is not unset:
kwargs["reference_table"] = reference_table
super().__init__(kwargs)

self_.enabled = enabled
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2019-Present Datadog, Inc.
from __future__ import annotations

from typing import List, Union

from datadog_api_client.model_utils import (
ModelNormal,
cached_property,
none_type,
unset,
UnsetType,
)


class ObservabilityPipelineEnrichmentTableReferenceTable(ModelNormal):
@cached_property
def openapi_types(_):
return {
"app_key_key": (str,),
"columns": ([str], none_type),
"key_field": (str,),
"table_id": (str,),
}

attribute_map = {
"app_key_key": "app_key_key",
"columns": "columns",
"key_field": "key_field",
"table_id": "table_id",
}

def __init__(
self_,
key_field: str,
table_id: str,
app_key_key: Union[str, UnsetType] = unset,
columns: Union[List[str], none_type, UnsetType] = unset,
**kwargs,
):
"""
Uses a Datadog reference table to enrich logs.

:param app_key_key: Environment variable name containing the application key used for reference table authentication.
:type app_key_key: str, optional

:param columns: List of column names to include from the reference table. If not provided, all columns are included.
:type columns: [str], none_type, optional

:param key_field: Path to the field in the log event to match against the reference table.
:type key_field: str

:param table_id: The unique identifier of the reference table.
:type table_id: str
"""
if app_key_key is not unset:
kwargs["app_key_key"] = app_key_key
if columns is not unset:
kwargs["columns"] = columns
super().__init__(kwargs)

self_.key_field = key_field
self_.table_id = table_id
4 changes: 4 additions & 0 deletions src/datadog_api_client/v2/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3030,6 +3030,9 @@
from datadog_api_client.v2.model.observability_pipeline_enrichment_table_processor_type import (
ObservabilityPipelineEnrichmentTableProcessorType,
)
from datadog_api_client.v2.model.observability_pipeline_enrichment_table_reference_table import (
ObservabilityPipelineEnrichmentTableReferenceTable,
)
from datadog_api_client.v2.model.observability_pipeline_field_value import ObservabilityPipelineFieldValue
from datadog_api_client.v2.model.observability_pipeline_filter_processor import ObservabilityPipelineFilterProcessor
from datadog_api_client.v2.model.observability_pipeline_filter_processor_type import (
Expand Down Expand Up @@ -7406,6 +7409,7 @@
"ObservabilityPipelineEnrichmentTableGeoIp",
"ObservabilityPipelineEnrichmentTableProcessor",
"ObservabilityPipelineEnrichmentTableProcessorType",
"ObservabilityPipelineEnrichmentTableReferenceTable",
"ObservabilityPipelineFieldValue",
"ObservabilityPipelineFilterProcessor",
"ObservabilityPipelineFilterProcessorType",
Expand Down
Loading