From 0ba8766ff7d4ba0938f62dda866c37d041061e7e Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Thu, 26 Mar 2026 13:57:11 +0000 Subject: [PATCH] Regenerate client from commit d3fa54d of spec repo --- .generator/schemas/v1/openapi.yaml | 8 +++++++- examples/v1/logs-indexes/CreateLogsIndex.ts | 1 + examples/v1/logs-indexes/UpdateLogsIndex.ts | 1 + features/v1/logs_indexes.feature | 10 +++++----- packages/datadog-api-client-v1/apis/LogsIndexesApi.ts | 2 +- .../models/LogsExclusionFilter.ts | 9 +++++++++ 6 files changed, 24 insertions(+), 7 deletions(-) diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 4b8fb50414e5..1e953cb02924 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -5931,6 +5931,12 @@ components: Scope down exclusion filter to only a subset of logs with a log query. example: "*" type: string + sample_attribute: + description: |- + Sample attribute to use for the sampling of logs going through this exclusion filter. + When set, only the logs with the specified attribute are sampled. + example: "@ci.job_id" + type: string sample_rate: description: |- Sample rate to apply to logs going through this exclusion filter, @@ -29894,7 +29900,7 @@ paths: Update an index as identified by its name. Returns the Index object passed in the request body when the request is successful. - Using the `PUT` method updates your index’s configuration by **replacing** + Using the `PUT` method updates your index's configuration by **replacing** your current configuration with the new one sent to your Datadog organization. operationId: UpdateLogsIndex parameters: diff --git a/examples/v1/logs-indexes/CreateLogsIndex.ts b/examples/v1/logs-indexes/CreateLogsIndex.ts index 99e8cb3bb820..0e194e65c0a2 100644 --- a/examples/v1/logs-indexes/CreateLogsIndex.ts +++ b/examples/v1/logs-indexes/CreateLogsIndex.ts @@ -19,6 +19,7 @@ const params: v1.LogsIndexesApiCreateLogsIndexRequest = { { filter: { query: "*", + sampleAttribute: "@ci.job_id", sampleRate: 1.0, }, name: "payment", diff --git a/examples/v1/logs-indexes/UpdateLogsIndex.ts b/examples/v1/logs-indexes/UpdateLogsIndex.ts index 8048b4630034..ac2c78348e06 100644 --- a/examples/v1/logs-indexes/UpdateLogsIndex.ts +++ b/examples/v1/logs-indexes/UpdateLogsIndex.ts @@ -20,6 +20,7 @@ const params: v1.LogsIndexesApiUpdateLogsIndexRequest = { { filter: { query: "*", + sampleAttribute: "@ci.job_id", sampleRate: 1.0, }, name: "payment", diff --git a/features/v1/logs_indexes.feature b/features/v1/logs_indexes.feature index 8277ce4ae244..4091527029ba 100644 --- a/features/v1/logs_indexes.feature +++ b/features/v1/logs_indexes.feature @@ -11,21 +11,21 @@ Feature: Logs Indexes @generated @skip @team:DataDog/logs-backend @team:DataDog/logs-core Scenario: Create an index returns "Invalid Parameter Error" response Given new "CreateLogsIndex" request - And body with value {"daily_limit": 300000000, "daily_limit_reset": {"reset_time": "14:00", "reset_utc_offset": "+02:00"}, "daily_limit_warning_threshold_percentage": 70, "exclusion_filters": [{"filter": {"query": "*", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "name": "main", "num_flex_logs_retention_days": 360, "num_retention_days": 15, "tags": ["team:backend", "env:production"]} + And body with value {"daily_limit": 300000000, "daily_limit_reset": {"reset_time": "14:00", "reset_utc_offset": "+02:00"}, "daily_limit_warning_threshold_percentage": 70, "exclusion_filters": [{"filter": {"query": "*", "sample_attribute": "@ci.job_id", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "name": "main", "num_flex_logs_retention_days": 360, "num_retention_days": 15, "tags": ["team:backend", "env:production"]} When the request is sent Then the response status is 400 Invalid Parameter Error @generated @skip @team:DataDog/logs-backend @team:DataDog/logs-core Scenario: Create an index returns "OK" response Given new "CreateLogsIndex" request - And body with value {"daily_limit": 300000000, "daily_limit_reset": {"reset_time": "14:00", "reset_utc_offset": "+02:00"}, "daily_limit_warning_threshold_percentage": 70, "exclusion_filters": [{"filter": {"query": "*", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "name": "main", "num_flex_logs_retention_days": 360, "num_retention_days": 15, "tags": ["team:backend", "env:production"]} + And body with value {"daily_limit": 300000000, "daily_limit_reset": {"reset_time": "14:00", "reset_utc_offset": "+02:00"}, "daily_limit_warning_threshold_percentage": 70, "exclusion_filters": [{"filter": {"query": "*", "sample_attribute": "@ci.job_id", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "name": "main", "num_flex_logs_retention_days": 360, "num_retention_days": 15, "tags": ["team:backend", "env:production"]} When the request is sent Then the response status is 200 OK @generated @skip @team:DataDog/logs-backend @team:DataDog/logs-core Scenario: Create an index returns "Unprocessable Entity" response Given new "CreateLogsIndex" request - And body with value {"daily_limit": 300000000, "daily_limit_reset": {"reset_time": "14:00", "reset_utc_offset": "+02:00"}, "daily_limit_warning_threshold_percentage": 70, "exclusion_filters": [{"filter": {"query": "*", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "name": "main", "num_flex_logs_retention_days": 360, "num_retention_days": 15, "tags": ["team:backend", "env:production"]} + And body with value {"daily_limit": 300000000, "daily_limit_reset": {"reset_time": "14:00", "reset_utc_offset": "+02:00"}, "daily_limit_warning_threshold_percentage": 70, "exclusion_filters": [{"filter": {"query": "*", "sample_attribute": "@ci.job_id", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "name": "main", "num_flex_logs_retention_days": 360, "num_retention_days": 15, "tags": ["team:backend", "env:production"]} When the request is sent Then the response status is 422 Unprocessable Entity @@ -73,7 +73,7 @@ Feature: Logs Indexes Scenario: Update an index returns "Invalid Parameter Error" response Given new "UpdateLogsIndex" request And request contains "name" parameter from "REPLACE.ME" - And body with value {"daily_limit": 300000000, "daily_limit_reset": {"reset_time": "14:00", "reset_utc_offset": "+02:00"}, "daily_limit_warning_threshold_percentage": 70, "disable_daily_limit": false, "exclusion_filters": [{"filter": {"query": "*", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "num_flex_logs_retention_days": 360, "num_retention_days": 15, "tags": ["team:backend", "env:production"]} + And body with value {"daily_limit": 300000000, "daily_limit_reset": {"reset_time": "14:00", "reset_utc_offset": "+02:00"}, "daily_limit_warning_threshold_percentage": 70, "disable_daily_limit": false, "exclusion_filters": [{"filter": {"query": "*", "sample_attribute": "@ci.job_id", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "num_flex_logs_retention_days": 360, "num_retention_days": 15, "tags": ["team:backend", "env:production"]} When the request is sent Then the response status is 400 Invalid Parameter Error @@ -81,7 +81,7 @@ Feature: Logs Indexes Scenario: Update an index returns "OK" response Given new "UpdateLogsIndex" request And request contains "name" parameter from "REPLACE.ME" - And body with value {"daily_limit": 300000000, "daily_limit_reset": {"reset_time": "14:00", "reset_utc_offset": "+02:00"}, "daily_limit_warning_threshold_percentage": 70, "disable_daily_limit": false, "exclusion_filters": [{"filter": {"query": "*", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "num_flex_logs_retention_days": 360, "num_retention_days": 15, "tags": ["team:backend", "env:production"]} + And body with value {"daily_limit": 300000000, "daily_limit_reset": {"reset_time": "14:00", "reset_utc_offset": "+02:00"}, "daily_limit_warning_threshold_percentage": 70, "disable_daily_limit": false, "exclusion_filters": [{"filter": {"query": "*", "sample_attribute": "@ci.job_id", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "num_flex_logs_retention_days": 360, "num_retention_days": 15, "tags": ["team:backend", "env:production"]} When the request is sent Then the response status is 200 OK diff --git a/packages/datadog-api-client-v1/apis/LogsIndexesApi.ts b/packages/datadog-api-client-v1/apis/LogsIndexesApi.ts index 11b8f0ec4072..b9de528c465a 100644 --- a/packages/datadog-api-client-v1/apis/LogsIndexesApi.ts +++ b/packages/datadog-api-client-v1/apis/LogsIndexesApi.ts @@ -965,7 +965,7 @@ export class LogsIndexesApi { * Update an index as identified by its name. * Returns the Index object passed in the request body when the request is successful. * - * Using the `PUT` method updates your index’s configuration by **replacing** + * Using the `PUT` method updates your index's configuration by **replacing** * your current configuration with the new one sent to your Datadog organization. * @param param The request object */ diff --git a/packages/datadog-api-client-v1/models/LogsExclusionFilter.ts b/packages/datadog-api-client-v1/models/LogsExclusionFilter.ts index dea38fbe9aeb..aa5ce226f127 100644 --- a/packages/datadog-api-client-v1/models/LogsExclusionFilter.ts +++ b/packages/datadog-api-client-v1/models/LogsExclusionFilter.ts @@ -15,6 +15,11 @@ export class LogsExclusionFilter { * Scope down exclusion filter to only a subset of logs with a log query. */ "query"?: string; + /** + * Sample attribute to use for the sampling of logs going through this exclusion filter. + * When set, only the logs with the specified attribute are sampled. + */ + "sampleAttribute"?: string; /** * Sample rate to apply to logs going through this exclusion filter, * a value of 1.0 excludes all logs matching the query. @@ -41,6 +46,10 @@ export class LogsExclusionFilter { baseName: "query", type: "string", }, + sampleAttribute: { + baseName: "sample_attribute", + type: "string", + }, sampleRate: { baseName: "sample_rate", type: "number",