Skip to content

OP datadog tags processor #2705

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
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": "2e1c8ca",
"generated": "2025-07-16 17:25:17.887"
"spec_repo_commit": "2945951",
"generated": "2025-07-16 19:27:24.231"
}
75 changes: 75 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25164,6 +25164,7 @@ components:
- $ref: '#/components/schemas/ObservabilityPipelineEnrichmentTableProcessor'
- $ref: '#/components/schemas/ObservabilityPipelineReduceProcessor'
- $ref: '#/components/schemas/ObservabilityPipelineThrottleProcessor'
- $ref: '#/components/schemas/ObservabilityPipelineDatadogTagsProcessor'
ObservabilityPipelineConfigSourceItem:
description: A data source for the pipeline.
oneOf:
Expand Down Expand Up @@ -25273,6 +25274,80 @@ components:
type: string
x-enum-varnames:
- DATADOG_LOGS
ObservabilityPipelineDatadogTagsProcessor:
description: The `datadog_tags` processor includes or excludes specific Datadog
tags in your logs.
properties:
action:
$ref: '#/components/schemas/ObservabilityPipelineDatadogTagsProcessorAction'
id:
description: The unique identifier for this component. Used to reference
this component in other parts of the pipeline (for example, as the `input`
to downstream components).
example: datadog-tags-processor
type: string
include:
description: A Datadog search query used to determine which logs this processor
targets.
example: service:my-service
type: string
inputs:
description: A list of component IDs whose output is used as the `input`
for this component.
example:
- datadog-agent-source
items:
type: string
type: array
keys:
description: A list of tag keys.
example:
- env
- service
- version
items:
type: string
type: array
mode:
$ref: '#/components/schemas/ObservabilityPipelineDatadogTagsProcessorMode'
type:
$ref: '#/components/schemas/ObservabilityPipelineDatadogTagsProcessorType'
required:
- id
- type
- include
- mode
- action
- keys
- inputs
type: object
ObservabilityPipelineDatadogTagsProcessorAction:
description: The action to take on tags with matching keys.
enum:
- include
- exclude
example: include
type: string
x-enum-varnames:
- INCLUDE
- EXCLUDE
ObservabilityPipelineDatadogTagsProcessorMode:
description: The processing mode.
enum:
- filter
example: filter
type: string
x-enum-varnames:
- FILTER
ObservabilityPipelineDatadogTagsProcessorType:
default: datadog_tags
description: The processor type. The value should always be `datadog_tags`.
enum:
- datadog_tags
example: datadog_tags
type: string
x-enum-varnames:
- DATADOG_TAGS
ObservabilityPipelineDecoding:
description: The decoding format used to interpret incoming logs.
enum:
Expand Down
28 changes: 28 additions & 0 deletions docs/datadog_api_client.v2.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10819,6 +10819,34 @@ datadog\_api\_client.v2.model.observability\_pipeline\_datadog\_logs\_destinatio
:members:
:show-inheritance:

datadog\_api\_client.v2.model.observability\_pipeline\_datadog\_tags\_processor module
--------------------------------------------------------------------------------------

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

datadog\_api\_client.v2.model.observability\_pipeline\_datadog\_tags\_processor\_action module
----------------------------------------------------------------------------------------------

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

datadog\_api\_client.v2.model.observability\_pipeline\_datadog\_tags\_processor\_mode module
--------------------------------------------------------------------------------------------

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

datadog\_api\_client.v2.model.observability\_pipeline\_datadog\_tags\_processor\_type module
--------------------------------------------------------------------------------------------

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

datadog\_api\_client.v2.model.observability\_pipeline\_decoding module
----------------------------------------------------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@
from datadog_api_client.v2.model.observability_pipeline_throttle_processor import (
ObservabilityPipelineThrottleProcessor,
)
from datadog_api_client.v2.model.observability_pipeline_datadog_tags_processor import (
ObservabilityPipelineDatadogTagsProcessor,
)
from datadog_api_client.v2.model.observability_pipeline_kafka_source import ObservabilityPipelineKafkaSource
from datadog_api_client.v2.model.observability_pipeline_datadog_agent_source import (
ObservabilityPipelineDatadogAgentSource,
Expand Down Expand Up @@ -224,6 +227,7 @@ def __init__(
ObservabilityPipelineEnrichmentTableProcessor,
ObservabilityPipelineReduceProcessor,
ObservabilityPipelineThrottleProcessor,
ObservabilityPipelineDatadogTagsProcessor,
]
],
UnsetType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@ def __init__(self, **kwargs):

:param window: The time window in seconds over which the threshold applies.
:type window: float

:param action: The action to take on tags with matching keys.
:type action: ObservabilityPipelineDatadogTagsProcessorAction

:param keys: A list of tag keys.
:type keys: [str]
"""
super().__init__(kwargs)

Expand Down Expand Up @@ -162,6 +168,9 @@ def _composed_schemas(_):
from datadog_api_client.v2.model.observability_pipeline_throttle_processor import (
ObservabilityPipelineThrottleProcessor,
)
from datadog_api_client.v2.model.observability_pipeline_datadog_tags_processor import (
ObservabilityPipelineDatadogTagsProcessor,
)

return {
"oneOf": [
Expand All @@ -181,5 +190,6 @@ def _composed_schemas(_):
ObservabilityPipelineEnrichmentTableProcessor,
ObservabilityPipelineReduceProcessor,
ObservabilityPipelineThrottleProcessor,
ObservabilityPipelineDatadogTagsProcessor,
],
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# 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, TYPE_CHECKING

from datadog_api_client.model_utils import (
ModelNormal,
cached_property,
)


if TYPE_CHECKING:
from datadog_api_client.v2.model.observability_pipeline_datadog_tags_processor_action import (
ObservabilityPipelineDatadogTagsProcessorAction,
)
from datadog_api_client.v2.model.observability_pipeline_datadog_tags_processor_mode import (
ObservabilityPipelineDatadogTagsProcessorMode,
)
from datadog_api_client.v2.model.observability_pipeline_datadog_tags_processor_type import (
ObservabilityPipelineDatadogTagsProcessorType,
)


class ObservabilityPipelineDatadogTagsProcessor(ModelNormal):
@cached_property
def openapi_types(_):
from datadog_api_client.v2.model.observability_pipeline_datadog_tags_processor_action import (
ObservabilityPipelineDatadogTagsProcessorAction,
)
from datadog_api_client.v2.model.observability_pipeline_datadog_tags_processor_mode import (
ObservabilityPipelineDatadogTagsProcessorMode,
)
from datadog_api_client.v2.model.observability_pipeline_datadog_tags_processor_type import (
ObservabilityPipelineDatadogTagsProcessorType,
)

return {
"action": (ObservabilityPipelineDatadogTagsProcessorAction,),
"id": (str,),
"include": (str,),
"inputs": ([str],),
"keys": ([str],),
"mode": (ObservabilityPipelineDatadogTagsProcessorMode,),
"type": (ObservabilityPipelineDatadogTagsProcessorType,),
}

attribute_map = {
"action": "action",
"id": "id",
"include": "include",
"inputs": "inputs",
"keys": "keys",
"mode": "mode",
"type": "type",
}

def __init__(
self_,
action: ObservabilityPipelineDatadogTagsProcessorAction,
id: str,
include: str,
inputs: List[str],
keys: List[str],
mode: ObservabilityPipelineDatadogTagsProcessorMode,
type: ObservabilityPipelineDatadogTagsProcessorType,
**kwargs,
):
"""
The ``datadog_tags`` processor includes or excludes specific Datadog tags in your logs.

:param action: The action to take on tags with matching keys.
:type action: ObservabilityPipelineDatadogTagsProcessorAction

:param id: The unique identifier for this component. Used to reference this component in other parts of the pipeline (for example, as the ``input`` to downstream components).
:type id: str

:param include: A Datadog search query used to determine which logs this processor targets.
:type include: str

:param inputs: A list of component IDs whose output is used as the ``input`` for this component.
:type inputs: [str]

:param keys: A list of tag keys.
:type keys: [str]

:param mode: The processing mode.
:type mode: ObservabilityPipelineDatadogTagsProcessorMode

:param type: The processor type. The value should always be ``datadog_tags``.
:type type: ObservabilityPipelineDatadogTagsProcessorType
"""
super().__init__(kwargs)

self_.action = action
self_.id = id
self_.include = include
self_.inputs = inputs
self_.keys = keys
self_.mode = mode
self_.type = type
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# 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 datadog_api_client.model_utils import (
ModelSimple,
cached_property,
)

from typing import ClassVar


class ObservabilityPipelineDatadogTagsProcessorAction(ModelSimple):
"""
The action to take on tags with matching keys.

:param value: Must be one of ["include", "exclude"].
:type value: str
"""

allowed_values = {
"include",
"exclude",
}
INCLUDE: ClassVar["ObservabilityPipelineDatadogTagsProcessorAction"]
EXCLUDE: ClassVar["ObservabilityPipelineDatadogTagsProcessorAction"]

@cached_property
def openapi_types(_):
return {
"value": (str,),
}


ObservabilityPipelineDatadogTagsProcessorAction.INCLUDE = ObservabilityPipelineDatadogTagsProcessorAction("include")
ObservabilityPipelineDatadogTagsProcessorAction.EXCLUDE = ObservabilityPipelineDatadogTagsProcessorAction("exclude")
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# 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 datadog_api_client.model_utils import (
ModelSimple,
cached_property,
)

from typing import ClassVar


class ObservabilityPipelineDatadogTagsProcessorMode(ModelSimple):
"""
The processing mode.

:param value: If omitted defaults to "filter". Must be one of ["filter"].
:type value: str
"""

allowed_values = {
"filter",
}
FILTER: ClassVar["ObservabilityPipelineDatadogTagsProcessorMode"]

@cached_property
def openapi_types(_):
return {
"value": (str,),
}


ObservabilityPipelineDatadogTagsProcessorMode.FILTER = ObservabilityPipelineDatadogTagsProcessorMode("filter")
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# 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 datadog_api_client.model_utils import (
ModelSimple,
cached_property,
)

from typing import ClassVar


class ObservabilityPipelineDatadogTagsProcessorType(ModelSimple):
"""
The processor type. The value should always be `datadog_tags`.

:param value: If omitted defaults to "datadog_tags". Must be one of ["datadog_tags"].
:type value: str
"""

allowed_values = {
"datadog_tags",
}
DATADOG_TAGS: ClassVar["ObservabilityPipelineDatadogTagsProcessorType"]

@cached_property
def openapi_types(_):
return {
"value": (str,),
}


ObservabilityPipelineDatadogTagsProcessorType.DATADOG_TAGS = ObservabilityPipelineDatadogTagsProcessorType(
"datadog_tags"
)
Loading
Loading