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
13 changes: 13 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72239,6 +72239,12 @@ components:
items:
$ref: "#/components/schemas/ObservabilityPipelineConfigDestinationItem"
type: array
end_to_end_acknowledgements:
description: |-
Enables end-to-end event delivery confirmation for the pipeline. When enabled, sources confirm receipt only after all destinations have successfully received the events.
Requires Observability Pipelines Worker 2.14 or later. All configured sources must support this behavior.
example: true
type: boolean
pipeline_type:
$ref: "#/components/schemas/ObservabilityPipelineConfigPipelineType"
processor_groups:
Expand Down Expand Up @@ -177228,6 +177234,7 @@ paths:
inputs:
- datadog-agent-source
type: datadog_logs
end_to_end_acknowledgements: true
sources:
- id: datadog-agent-source
type: datadog_agent
Expand Down Expand Up @@ -177267,6 +177274,7 @@ paths:
inputs:
- my-processor-group
type: datadog_logs
end_to_end_acknowledgements: true
pipeline_type: logs
processor_groups:
- enabled: true
Expand Down Expand Up @@ -177308,6 +177316,7 @@ paths:
inputs:
- datadog-agent-source
type: datadog_logs
end_to_end_acknowledgements: true
sources:
- id: datadog-agent-source
type: datadog_agent
Expand Down Expand Up @@ -177352,6 +177361,7 @@ paths:
inputs:
- my-processor-group
type: datadog_logs
end_to_end_acknowledgements: true
pipeline_type: logs
processor_groups:
- enabled: true
Expand Down Expand Up @@ -177468,6 +177478,7 @@ paths:
inputs:
- datadog-agent-source
type: datadog_logs
end_to_end_acknowledgements: true
sources:
- id: datadog-agent-source
type: datadog_agent
Expand Down Expand Up @@ -177516,6 +177527,7 @@ paths:
inputs:
- my-processor-group
type: datadog_logs
end_to_end_acknowledgements: true
pipeline_type: logs
processor_groups:
- enabled: true
Expand Down Expand Up @@ -177558,6 +177570,7 @@ paths:
inputs:
- datadog-agent-source
type: datadog_logs
end_to_end_acknowledgements: true
sources:
- id: datadog-agent-source
type: datadog_agent
Expand Down
20 changes: 20 additions & 0 deletions src/datadogV2/model/model_observability_pipeline_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ pub struct ObservabilityPipelineConfig {
/// A list of destination components where processed logs are sent.
#[serde(rename = "destinations")]
pub destinations: Vec<crate::datadogV2::model::ObservabilityPipelineConfigDestinationItem>,
/// Enables end-to-end event delivery confirmation for the pipeline. When enabled, sources confirm receipt only after all destinations have successfully received the events.
/// Requires Observability Pipelines Worker 2.14 or later. All configured sources must support this behavior.
#[serde(rename = "end_to_end_acknowledgements")]
pub end_to_end_acknowledgements: Option<bool>,
/// The type of data being ingested. Defaults to `logs` if not specified.
#[serde(rename = "pipeline_type")]
pub pipeline_type: Option<crate::datadogV2::model::ObservabilityPipelineConfigPipelineType>,
Expand Down Expand Up @@ -52,6 +56,7 @@ impl ObservabilityPipelineConfig {
#[allow(deprecated)]
ObservabilityPipelineConfig {
destinations,
end_to_end_acknowledgements: None,
pipeline_type: None,
processor_groups: None,
processors: None,
Expand All @@ -62,6 +67,12 @@ impl ObservabilityPipelineConfig {
}
}

#[allow(deprecated)]
pub fn end_to_end_acknowledgements(mut self, value: bool) -> Self {
self.end_to_end_acknowledgements = Some(value);
self
}

#[allow(deprecated)]
pub fn pipeline_type(
mut self,
Expand Down Expand Up @@ -124,6 +135,7 @@ impl<'de> Deserialize<'de> for ObservabilityPipelineConfig {
let mut destinations: Option<
Vec<crate::datadogV2::model::ObservabilityPipelineConfigDestinationItem>,
> = None;
let mut end_to_end_acknowledgements: Option<bool> = None;
let mut pipeline_type: Option<
crate::datadogV2::model::ObservabilityPipelineConfigPipelineType,
> = None;
Expand All @@ -149,6 +161,13 @@ impl<'de> Deserialize<'de> for ObservabilityPipelineConfig {
destinations =
Some(serde_json::from_value(v).map_err(M::Error::custom)?);
}
"end_to_end_acknowledgements" => {
if v.is_null() {
continue;
}
end_to_end_acknowledgements =
Some(serde_json::from_value(v).map_err(M::Error::custom)?);
}
"pipeline_type" => {
if v.is_null() {
continue;
Expand Down Expand Up @@ -201,6 +220,7 @@ impl<'de> Deserialize<'de> for ObservabilityPipelineConfig {
#[allow(deprecated)]
let content = ObservabilityPipelineConfig {
destinations,
end_to_end_acknowledgements,
pipeline_type,
processor_groups,
processors,
Expand Down
4 changes: 2 additions & 2 deletions tests/scenarios/features/v2/observability_pipelines.feature
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Feature: Observability Pipelines
@generated @skip @team:DataDog/observability-pipelines
Scenario: Create a new pipeline returns "Conflict" response
Given new "CreatePipeline" request
And body with value {"data": {"attributes": {"config": {"destinations": [{"id": "datadog-logs-destination", "inputs": ["my-processor-group"], "type": "datadog_logs"}], "pipeline_type": "logs", "processor_groups": [{"enabled": true, "id": "my-processor-group", "include": "service:my-service", "inputs": ["datadog-agent-source"], "processors": [{"enabled": true, "id": "filter-processor", "include": "status:error", "type": "filter"}, {"enabled": true, "field": "message", "id": "json-processor", "include": "*", "type": "parse_json"}]}], "processors": [], "sources": [{"id": "datadog-agent-source", "type": "datadog_agent"}]}, "name": "Main Observability Pipeline"}, "type": "pipelines"}}
And body with value {"data": {"attributes": {"config": {"destinations": [{"id": "datadog-logs-destination", "inputs": ["my-processor-group"], "type": "datadog_logs"}], "end_to_end_acknowledgements": true, "pipeline_type": "logs", "processor_groups": [{"enabled": true, "id": "my-processor-group", "include": "service:my-service", "inputs": ["datadog-agent-source"], "processors": [{"enabled": true, "id": "filter-processor", "include": "status:error", "type": "filter"}, {"enabled": true, "field": "message", "id": "json-processor", "include": "*", "type": "parse_json"}]}], "processors": [], "sources": [{"id": "datadog-agent-source", "type": "datadog_agent"}]}, "name": "Main Observability Pipeline"}, "type": "pipelines"}}
When the request is sent
Then the response status is 409 Conflict

Expand Down Expand Up @@ -121,7 +121,7 @@ Feature: Observability Pipelines
Scenario: Update a pipeline returns "Conflict" response
Given new "UpdatePipeline" request
And request contains "pipeline_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"config": {"destinations": [{"id": "datadog-logs-destination", "inputs": ["my-processor-group"], "type": "datadog_logs"}], "pipeline_type": "logs", "processor_groups": [{"enabled": true, "id": "my-processor-group", "include": "service:my-service", "inputs": ["datadog-agent-source"], "processors": [{"enabled": true, "id": "filter-processor", "include": "status:error", "type": "filter"}, {"enabled": true, "field": "message", "id": "json-processor", "include": "*", "type": "parse_json"}]}], "processors": [], "sources": [{"id": "datadog-agent-source", "type": "datadog_agent"}]}, "name": "Main Observability Pipeline"}, "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "type": "pipelines"}}
And body with value {"data": {"attributes": {"config": {"destinations": [{"id": "datadog-logs-destination", "inputs": ["my-processor-group"], "type": "datadog_logs"}], "end_to_end_acknowledgements": true, "pipeline_type": "logs", "processor_groups": [{"enabled": true, "id": "my-processor-group", "include": "service:my-service", "inputs": ["datadog-agent-source"], "processors": [{"enabled": true, "id": "filter-processor", "include": "status:error", "type": "filter"}, {"enabled": true, "field": "message", "id": "json-processor", "include": "*", "type": "parse_json"}]}], "processors": [], "sources": [{"id": "datadog-agent-source", "type": "datadog_agent"}]}, "name": "Main Observability Pipeline"}, "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "type": "pipelines"}}
When the request is sent
Then the response status is 409 Conflict

Expand Down
Loading