diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 3bec741a12..dc0cd78d7a 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -44821,7 +44821,7 @@ components: Protocol (OTLP) over gRPC and HTTP. - **Supported pipeline types:** logs, metrics' + **Supported pipeline types:** logs' properties: grpc_address_key: description: Environment variable name containing the gRPC server address @@ -44851,7 +44851,6 @@ components: type: object x-pipeline-types: - logs - - metrics ObservabilityPipelineOpentelemetrySourceType: default: opentelemetry description: The source type. The value should always be `opentelemetry`. @@ -62296,15 +62295,18 @@ components: type: array type: object ServiceList: + description: The response body for the service list endpoint. properties: data: $ref: '#/components/schemas/ServiceListData' type: object ServiceListData: + description: A single data item in the service list response. properties: attributes: $ref: '#/components/schemas/ServiceListDataAttributes' id: + description: The unique identifier of the service. type: string type: $ref: '#/components/schemas/ServiceListDataType' @@ -62312,21 +62314,30 @@ components: - type type: object ServiceListDataAttributes: + description: Attributes of a service list entry, containing metadata and a list + of service names. properties: metadata: + description: A list of metadata items associated with the service. items: $ref: '#/components/schemas/ServiceListDataAttributesMetadataItems' type: array services: + description: A list of service names. items: + description: A single service name. type: string type: array type: object ServiceListDataAttributesMetadataItems: + description: An object containing metadata flags for a service, indicating whether + it is traced by APM or monitored via Universal Service Monitoring. properties: isTraced: + description: Indicates whether the service is traced by APM. type: boolean isUsm: + description: Indicates whether the service uses Universal Service Monitoring. type: boolean type: object ServiceListDataType: diff --git a/examples/v2/observability-pipelines/ValidatePipeline_884022323.py b/examples/v2/observability-pipelines/ValidatePipeline_884022323.py deleted file mode 100644 index fda04b4c53..0000000000 --- a/examples/v2/observability-pipelines/ValidatePipeline_884022323.py +++ /dev/null @@ -1,84 +0,0 @@ -""" -Validate a metrics pipeline with opentelemetry source returns "OK" response -""" - -from datadog_api_client import ApiClient, Configuration -from datadog_api_client.v2.api.observability_pipelines_api import ObservabilityPipelinesApi -from datadog_api_client.v2.model.observability_pipeline_config import ObservabilityPipelineConfig -from datadog_api_client.v2.model.observability_pipeline_config_pipeline_type import ( - ObservabilityPipelineConfigPipelineType, -) -from datadog_api_client.v2.model.observability_pipeline_config_processor_group import ( - ObservabilityPipelineConfigProcessorGroup, -) -from datadog_api_client.v2.model.observability_pipeline_data_attributes import ObservabilityPipelineDataAttributes -from datadog_api_client.v2.model.observability_pipeline_datadog_metrics_destination import ( - ObservabilityPipelineDatadogMetricsDestination, -) -from datadog_api_client.v2.model.observability_pipeline_datadog_metrics_destination_type import ( - ObservabilityPipelineDatadogMetricsDestinationType, -) -from datadog_api_client.v2.model.observability_pipeline_filter_processor import ObservabilityPipelineFilterProcessor -from datadog_api_client.v2.model.observability_pipeline_filter_processor_type import ( - ObservabilityPipelineFilterProcessorType, -) -from datadog_api_client.v2.model.observability_pipeline_opentelemetry_source import ( - ObservabilityPipelineOpentelemetrySource, -) -from datadog_api_client.v2.model.observability_pipeline_opentelemetry_source_type import ( - ObservabilityPipelineOpentelemetrySourceType, -) -from datadog_api_client.v2.model.observability_pipeline_spec import ObservabilityPipelineSpec -from datadog_api_client.v2.model.observability_pipeline_spec_data import ObservabilityPipelineSpecData - -body = ObservabilityPipelineSpec( - data=ObservabilityPipelineSpecData( - attributes=ObservabilityPipelineDataAttributes( - config=ObservabilityPipelineConfig( - pipeline_type=ObservabilityPipelineConfigPipelineType.METRICS, - destinations=[ - ObservabilityPipelineDatadogMetricsDestination( - id="datadog-metrics-destination", - inputs=[ - "my-processor-group", - ], - type=ObservabilityPipelineDatadogMetricsDestinationType.DATADOG_METRICS, - ), - ], - processor_groups=[ - ObservabilityPipelineConfigProcessorGroup( - enabled=True, - id="my-processor-group", - include="*", - inputs=[ - "opentelemetry-source", - ], - processors=[ - ObservabilityPipelineFilterProcessor( - enabled=True, - id="filter-processor", - include="env:production", - type=ObservabilityPipelineFilterProcessorType.FILTER, - ), - ], - ), - ], - sources=[ - ObservabilityPipelineOpentelemetrySource( - id="opentelemetry-source", - type=ObservabilityPipelineOpentelemetrySourceType.OPENTELEMETRY, - ), - ], - ), - name="Metrics OTel Pipeline", - ), - type="pipelines", - ), -) - -configuration = Configuration() -with ApiClient(configuration) as api_client: - api_instance = ObservabilityPipelinesApi(api_client) - response = api_instance.validate_pipeline(body=body) - - print(response) diff --git a/src/datadog_api_client/v2/model/observability_pipeline_opentelemetry_source.py b/src/datadog_api_client/v2/model/observability_pipeline_opentelemetry_source.py index da09b968f1..ac6090dcd9 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_opentelemetry_source.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_opentelemetry_source.py @@ -56,7 +56,7 @@ def __init__( """ The ``opentelemetry`` source receives telemetry data using the OpenTelemetry Protocol (OTLP) over gRPC and HTTP. - **Supported pipeline types:** logs, metrics + **Supported pipeline types:** logs :param grpc_address_key: Environment variable name containing the gRPC server address for receiving OTLP data. Must be a valid environment variable name (alphanumeric characters and underscores only). :type grpc_address_key: str, optional diff --git a/src/datadog_api_client/v2/model/service_list.py b/src/datadog_api_client/v2/model/service_list.py index ad4860f847..dbc8b9337c 100644 --- a/src/datadog_api_client/v2/model/service_list.py +++ b/src/datadog_api_client/v2/model/service_list.py @@ -32,9 +32,9 @@ def openapi_types(_): def __init__(self_, data: Union[ServiceListData, UnsetType] = unset, **kwargs): """ + The response body for the service list endpoint. - - :param data: + :param data: A single data item in the service list response. :type data: ServiceListData, optional """ if data is not unset: diff --git a/src/datadog_api_client/v2/model/service_list_data.py b/src/datadog_api_client/v2/model/service_list_data.py index 666990211f..6becfd537e 100644 --- a/src/datadog_api_client/v2/model/service_list_data.py +++ b/src/datadog_api_client/v2/model/service_list_data.py @@ -44,12 +44,12 @@ def __init__( **kwargs, ): """ + A single data item in the service list response. - - :param attributes: + :param attributes: Attributes of a service list entry, containing metadata and a list of service names. :type attributes: ServiceListDataAttributes, optional - :param id: + :param id: The unique identifier of the service. :type id: str, optional :param type: Services list resource type. diff --git a/src/datadog_api_client/v2/model/service_list_data_attributes.py b/src/datadog_api_client/v2/model/service_list_data_attributes.py index 5599d6065e..565e2f3000 100644 --- a/src/datadog_api_client/v2/model/service_list_data_attributes.py +++ b/src/datadog_api_client/v2/model/service_list_data_attributes.py @@ -43,12 +43,12 @@ def __init__( **kwargs, ): """ + Attributes of a service list entry, containing metadata and a list of service names. - - :param metadata: + :param metadata: A list of metadata items associated with the service. :type metadata: [ServiceListDataAttributesMetadataItems], optional - :param services: + :param services: A list of service names. :type services: [str], optional """ if metadata is not unset: diff --git a/src/datadog_api_client/v2/model/service_list_data_attributes_metadata_items.py b/src/datadog_api_client/v2/model/service_list_data_attributes_metadata_items.py index 451a56d11a..84ddde0158 100644 --- a/src/datadog_api_client/v2/model/service_list_data_attributes_metadata_items.py +++ b/src/datadog_api_client/v2/model/service_list_data_attributes_metadata_items.py @@ -28,12 +28,12 @@ def openapi_types(_): def __init__(self_, is_traced: Union[bool, UnsetType] = unset, is_usm: Union[bool, UnsetType] = unset, **kwargs): """ + An object containing metadata flags for a service, indicating whether it is traced by APM or monitored via Universal Service Monitoring. - - :param is_traced: + :param is_traced: Indicates whether the service is traced by APM. :type is_traced: bool, optional - :param is_usm: + :param is_usm: Indicates whether the service uses Universal Service Monitoring. :type is_usm: bool, optional """ if is_traced is not unset: diff --git a/tests/v2/cassettes/test_scenarios/test_validate_a_metrics_pipeline_with_opentelemetry_source_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_validate_a_metrics_pipeline_with_opentelemetry_source_returns_ok_response.frozen deleted file mode 100644 index 9218d08a36..0000000000 --- a/tests/v2/cassettes/test_scenarios/test_validate_a_metrics_pipeline_with_opentelemetry_source_returns_ok_response.frozen +++ /dev/null @@ -1 +0,0 @@ -2026-03-10T16:11:47.487Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_validate_a_metrics_pipeline_with_opentelemetry_source_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_validate_a_metrics_pipeline_with_opentelemetry_source_returns_ok_response.yaml deleted file mode 100644 index b09e25bdb7..0000000000 --- a/tests/v2/cassettes/test_scenarios/test_validate_a_metrics_pipeline_with_opentelemetry_source_returns_ok_response.yaml +++ /dev/null @@ -1,23 +0,0 @@ -interactions: -- request: - body: '{"data":{"attributes":{"config":{"destinations":[{"id":"datadog-metrics-destination","inputs":["my-processor-group"],"type":"datadog_metrics"}],"pipeline_type":"metrics","processor_groups":[{"enabled":true,"id":"my-processor-group","include":"*","inputs":["opentelemetry-source"],"processors":[{"enabled":true,"id":"filter-processor","include":"env:production","type":"filter"}]}],"sources":[{"id":"opentelemetry-source","type":"opentelemetry"}]},"name":"Metrics - OTel Pipeline"},"type":"pipelines"}}' - headers: - accept: - - application/json - content-type: - - application/json - method: POST - uri: https://api.datadoghq.com/api/v2/obs-pipelines/pipelines/validate - response: - body: - string: '{"errors":[]} - - ' - headers: - content-type: - - application/vnd.api+json - status: - code: 200 - message: OK -version: 1 diff --git a/tests/v2/features/observability_pipelines.feature b/tests/v2/features/observability_pipelines.feature index e272303955..bf90c06c13 100644 --- a/tests/v2/features/observability_pipelines.feature +++ b/tests/v2/features/observability_pipelines.feature @@ -149,14 +149,6 @@ Feature: Observability Pipelines And the response "data.attributes.config.destinations" has length 1 And the response "data.attributes.config.destinations[0].id" is equal to "updated-datadog-logs-destination-id" - @team:DataDog/observability-pipelines - Scenario: Validate a metrics pipeline with opentelemetry source returns "OK" response - Given new "ValidatePipeline" request - And body with value {"data": {"attributes": {"config": {"pipeline_type": "metrics", "destinations": [{"id": "datadog-metrics-destination", "inputs": ["my-processor-group"], "type": "datadog_metrics"}], "processor_groups": [{"enabled": true, "id": "my-processor-group", "include": "*", "inputs": ["opentelemetry-source"], "processors": [{"enabled": true, "id": "filter-processor", "include": "env:production", "type": "filter"}]}], "sources": [{"id": "opentelemetry-source", "type": "opentelemetry"}]}, "name": "Metrics OTel Pipeline"}, "type": "pipelines"}} - When the request is sent - Then the response status is 200 OK - And the response "errors" has length 0 - @team:DataDog/observability-pipelines Scenario: Validate an observability pipeline returns "Bad Request" response Given new "ValidatePipeline" request