Skip to content

Commit c6e02e3

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add Obs Pipelines Elasticsearch metrics destination and new fields (#3195)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 72af9e1 commit c6e02e3

7 files changed

+299
-19
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 53 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43722,6 +43722,7 @@ components:
4372243722
ObservabilityPipelineConfigDestinationItem:
4372343723
description: "A destination for the pipeline."
4372443724
oneOf:
43725+
- $ref: "#/components/schemas/ObservabilityPipelineElasticsearchDestination"
4372543726
- $ref: "#/components/schemas/ObservabilityPipelineHttpClientDestination"
4372643727
- $ref: "#/components/schemas/ObservabilityPipelineAmazonOpenSearchDestination"
4372743728
- $ref: "#/components/schemas/ObservabilityPipelineAmazonS3Destination"
@@ -43731,7 +43732,6 @@ components:
4373143732
- $ref: "#/components/schemas/ObservabilityPipelineCloudPremDestination"
4373243733
- $ref: "#/components/schemas/ObservabilityPipelineCrowdStrikeNextGenSiemDestination"
4373343734
- $ref: "#/components/schemas/ObservabilityPipelineDatadogLogsDestination"
43734-
- $ref: "#/components/schemas/ObservabilityPipelineElasticsearchDestination"
4373543735
- $ref: "#/components/schemas/ObservabilityPipelineGoogleChronicleDestination"
4373643736
- $ref: "#/components/schemas/ObservabilityPipelineGoogleCloudStorageDestination"
4373743737
- $ref: "#/components/schemas/ObservabilityPipelineGooglePubSubDestination"
@@ -44333,9 +44333,9 @@ components:
4433344333
type: object
4433444334
ObservabilityPipelineElasticsearchDestination:
4433544335
description: |-
44336-
The `elasticsearch` destination writes logs to an Elasticsearch cluster.
44336+
The `elasticsearch` destination writes logs or metrics to an Elasticsearch cluster.
4433744337

44338-
**Supported pipeline types:** logs
44338+
**Supported pipeline types:** logs, metrics
4433944339
properties:
4434044340
api_version:
4434144341
$ref: "#/components/schemas/ObservabilityPipelineElasticsearchDestinationApiVersion"
@@ -44344,9 +44344,11 @@ components:
4434444344
buffer:
4434544345
$ref: "#/components/schemas/ObservabilityPipelineBufferOptions"
4434644346
bulk_index:
44347-
description: The index to write logs to in Elasticsearch.
44347+
description: The name of the index to write events to in Elasticsearch.
4434844348
example: logs-index
4434944349
type: string
44350+
compression:
44351+
$ref: "#/components/schemas/ObservabilityPipelineElasticsearchDestinationCompression"
4435044352
data_stream:
4435144353
$ref: "#/components/schemas/ObservabilityPipelineElasticsearchDestinationDataStream"
4435244354
endpoint_url_key:
@@ -44357,21 +44359,34 @@ components:
4435744359
description: The unique identifier for this component.
4435844360
example: "elasticsearch-destination"
4435944361
type: string
44362+
id_key:
44363+
description: The name of the field used as the document ID in Elasticsearch.
44364+
example: id
44365+
type: string
4436044366
inputs:
4436144367
description: A list of component IDs whose output is used as the `input` for this component.
4436244368
example: ["filter-processor"]
4436344369
items:
4436444370
description: The ID of a component whose output is used as input for this destination.
4436544371
type: string
4436644372
type: array
44373+
pipeline:
44374+
description: The name of an Elasticsearch ingest pipeline to apply to events before indexing.
44375+
example: my-pipeline
44376+
type: string
44377+
request_retry_partial:
44378+
description: When `true`, retries failed partial bulk requests when some events in a batch fail while others succeed.
44379+
type: boolean
44380+
tls:
44381+
$ref: "#/components/schemas/ObservabilityPipelineTls"
4436744382
type:
4436844383
$ref: "#/components/schemas/ObservabilityPipelineElasticsearchDestinationType"
4436944384
required:
4437044385
- id
4437144386
- type
4437244387
- inputs
4437344388
type: object
44374-
x-pipeline-types: [logs]
44389+
x-pipeline-types: [logs, metrics]
4437544390
ObservabilityPipelineElasticsearchDestinationApiVersion:
4437644391
description: The Elasticsearch API version to use. Set to `auto` to auto-detect.
4437744392
enum: [auto, v6, v7, v8]
@@ -44400,18 +44415,48 @@ components:
4440044415
required:
4440144416
- strategy
4440244417
type: object
44418+
ObservabilityPipelineElasticsearchDestinationCompression:
44419+
description: Compression configuration for the Elasticsearch destination.
44420+
properties:
44421+
algorithm:
44422+
$ref: "#/components/schemas/ObservabilityPipelineElasticsearchDestinationCompressionAlgorithm"
44423+
level:
44424+
description: The compression level. Only applicable for `gzip`, `zlib`, and `zstd` algorithms.
44425+
example: 6
44426+
format: int64
44427+
type: integer
44428+
required:
44429+
- algorithm
44430+
type: object
44431+
ObservabilityPipelineElasticsearchDestinationCompressionAlgorithm:
44432+
description: The compression algorithm applied when sending data to Elasticsearch.
44433+
enum: [none, gzip, zlib, zstd, snappy]
44434+
example: gzip
44435+
type: string
44436+
x-enum-varnames:
44437+
- NONE
44438+
- GZIP
44439+
- ZLIB
44440+
- ZSTD
44441+
- SNAPPY
4440344442
ObservabilityPipelineElasticsearchDestinationDataStream:
4440444443
description: Configuration options for writing to Elasticsearch Data Streams instead of a fixed index.
4440544444
properties:
44445+
auto_routing:
44446+
description: When `true`, automatically routes events to the appropriate data stream based on the event content.
44447+
type: boolean
4440644448
dataset:
44407-
description: The data stream dataset for your logs. This groups logs by their source or application.
44449+
description: The data stream dataset. This groups events by their source or application.
4440844450
type: string
4440944451
dtype:
44410-
description: The data stream type for your logs. This determines how logs are categorized within the data stream.
44452+
description: The data stream type. This determines how events are categorized within the data stream.
4441144453
type: string
4441244454
namespace:
44413-
description: The data stream namespace for your logs. This separates logs into different environments or domains.
44455+
description: The data stream namespace. This separates events into different environments or domains.
4441444456
type: string
44457+
sync_fields:
44458+
description: When `true`, synchronizes data stream fields with the Elasticsearch index mapping.
44459+
type: boolean
4441544460
type: object
4441644461
ObservabilityPipelineElasticsearchDestinationType:
4441744462
default: elasticsearch

lib/datadog_api_client/inflector.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3835,6 +3835,8 @@ def overrides
38353835
"v2.observability_pipeline_elasticsearch_destination" => "ObservabilityPipelineElasticsearchDestination",
38363836
"v2.observability_pipeline_elasticsearch_destination_api_version" => "ObservabilityPipelineElasticsearchDestinationApiVersion",
38373837
"v2.observability_pipeline_elasticsearch_destination_auth" => "ObservabilityPipelineElasticsearchDestinationAuth",
3838+
"v2.observability_pipeline_elasticsearch_destination_compression" => "ObservabilityPipelineElasticsearchDestinationCompression",
3839+
"v2.observability_pipeline_elasticsearch_destination_compression_algorithm" => "ObservabilityPipelineElasticsearchDestinationCompressionAlgorithm",
38383840
"v2.observability_pipeline_elasticsearch_destination_data_stream" => "ObservabilityPipelineElasticsearchDestinationDataStream",
38393841
"v2.observability_pipeline_elasticsearch_destination_type" => "ObservabilityPipelineElasticsearchDestinationType",
38403842
"v2.observability_pipeline_enrichment_table_file" => "ObservabilityPipelineEnrichmentTableFile",

lib/datadog_api_client/v2/models/observability_pipeline_config_destination_item.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ class << self
2626
# List of class defined in oneOf (OpenAPI v3)
2727
def openapi_one_of
2828
[
29+
:'ObservabilityPipelineElasticsearchDestination',
2930
:'ObservabilityPipelineHttpClientDestination',
3031
:'ObservabilityPipelineAmazonOpenSearchDestination',
3132
:'ObservabilityPipelineAmazonS3Destination',
@@ -35,7 +36,6 @@ def openapi_one_of
3536
:'ObservabilityPipelineCloudPremDestination',
3637
:'ObservabilityPipelineCrowdStrikeNextGenSiemDestination',
3738
:'ObservabilityPipelineDatadogLogsDestination',
38-
:'ObservabilityPipelineElasticsearchDestination',
3939
:'ObservabilityPipelineGoogleChronicleDestination',
4040
:'ObservabilityPipelineGoogleCloudStorageDestination',
4141
:'ObservabilityPipelineGooglePubSubDestination',

lib/datadog_api_client/v2/models/observability_pipeline_elasticsearch_destination.rb

Lines changed: 54 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
require 'time'
1818

1919
module DatadogAPIClient::V2
20-
# The `elasticsearch` destination writes logs to an Elasticsearch cluster.
20+
# The `elasticsearch` destination writes logs or metrics to an Elasticsearch cluster.
2121
#
22-
# **Supported pipeline types:** logs
22+
# **Supported pipeline types:** logs, metrics
2323
class ObservabilityPipelineElasticsearchDestination
2424
include BaseGenericModel
2525

@@ -33,9 +33,12 @@ class ObservabilityPipelineElasticsearchDestination
3333
# Configuration for buffer settings on destination components.
3434
attr_accessor :buffer
3535

36-
# The index to write logs to in Elasticsearch.
36+
# The name of the index to write events to in Elasticsearch.
3737
attr_accessor :bulk_index
3838

39+
# Compression configuration for the Elasticsearch destination.
40+
attr_accessor :compression
41+
3942
# Configuration options for writing to Elasticsearch Data Streams instead of a fixed index.
4043
attr_accessor :data_stream
4144

@@ -45,9 +48,21 @@ class ObservabilityPipelineElasticsearchDestination
4548
# The unique identifier for this component.
4649
attr_reader :id
4750

51+
# The name of the field used as the document ID in Elasticsearch.
52+
attr_accessor :id_key
53+
4854
# A list of component IDs whose output is used as the `input` for this component.
4955
attr_reader :inputs
5056

57+
# The name of an Elasticsearch ingest pipeline to apply to events before indexing.
58+
attr_accessor :pipeline
59+
60+
# When `true`, retries failed partial bulk requests when some events in a batch fail while others succeed.
61+
attr_accessor :request_retry_partial
62+
63+
# Configuration for enabling TLS encryption between the pipeline component and external services.
64+
attr_accessor :tls
65+
5166
# The destination type. The value should always be `elasticsearch`.
5267
attr_reader :type
5368

@@ -61,10 +76,15 @@ def self.attribute_map
6176
:'auth' => :'auth',
6277
:'buffer' => :'buffer',
6378
:'bulk_index' => :'bulk_index',
79+
:'compression' => :'compression',
6480
:'data_stream' => :'data_stream',
6581
:'endpoint_url_key' => :'endpoint_url_key',
6682
:'id' => :'id',
83+
:'id_key' => :'id_key',
6784
:'inputs' => :'inputs',
85+
:'pipeline' => :'pipeline',
86+
:'request_retry_partial' => :'request_retry_partial',
87+
:'tls' => :'tls',
6888
:'type' => :'type'
6989
}
7090
end
@@ -77,10 +97,15 @@ def self.openapi_types
7797
:'auth' => :'ObservabilityPipelineElasticsearchDestinationAuth',
7898
:'buffer' => :'ObservabilityPipelineBufferOptions',
7999
:'bulk_index' => :'String',
100+
:'compression' => :'ObservabilityPipelineElasticsearchDestinationCompression',
80101
:'data_stream' => :'ObservabilityPipelineElasticsearchDestinationDataStream',
81102
:'endpoint_url_key' => :'String',
82103
:'id' => :'String',
104+
:'id_key' => :'String',
83105
:'inputs' => :'Array<String>',
106+
:'pipeline' => :'String',
107+
:'request_retry_partial' => :'Boolean',
108+
:'tls' => :'ObservabilityPipelineTls',
84109
:'type' => :'ObservabilityPipelineElasticsearchDestinationType'
85110
}
86111
end
@@ -119,6 +144,10 @@ def initialize(attributes = {})
119144
self.bulk_index = attributes[:'bulk_index']
120145
end
121146

147+
if attributes.key?(:'compression')
148+
self.compression = attributes[:'compression']
149+
end
150+
122151
if attributes.key?(:'data_stream')
123152
self.data_stream = attributes[:'data_stream']
124153
end
@@ -131,12 +160,28 @@ def initialize(attributes = {})
131160
self.id = attributes[:'id']
132161
end
133162

163+
if attributes.key?(:'id_key')
164+
self.id_key = attributes[:'id_key']
165+
end
166+
134167
if attributes.key?(:'inputs')
135168
if (value = attributes[:'inputs']).is_a?(Array)
136169
self.inputs = value
137170
end
138171
end
139172

173+
if attributes.key?(:'pipeline')
174+
self.pipeline = attributes[:'pipeline']
175+
end
176+
177+
if attributes.key?(:'request_retry_partial')
178+
self.request_retry_partial = attributes[:'request_retry_partial']
179+
end
180+
181+
if attributes.key?(:'tls')
182+
self.tls = attributes[:'tls']
183+
end
184+
140185
if attributes.key?(:'type')
141186
self.type = attributes[:'type']
142187
end
@@ -212,10 +257,15 @@ def ==(o)
212257
auth == o.auth &&
213258
buffer == o.buffer &&
214259
bulk_index == o.bulk_index &&
260+
compression == o.compression &&
215261
data_stream == o.data_stream &&
216262
endpoint_url_key == o.endpoint_url_key &&
217263
id == o.id &&
264+
id_key == o.id_key &&
218265
inputs == o.inputs &&
266+
pipeline == o.pipeline &&
267+
request_retry_partial == o.request_retry_partial &&
268+
tls == o.tls &&
219269
type == o.type &&
220270
additional_properties == o.additional_properties
221271
end
@@ -224,7 +274,7 @@ def ==(o)
224274
# @return [Integer] Hash code
225275
# @!visibility private
226276
def hash
227-
[api_version, auth, buffer, bulk_index, data_stream, endpoint_url_key, id, inputs, type, additional_properties].hash
277+
[api_version, auth, buffer, bulk_index, compression, data_stream, endpoint_url_key, id, id_key, inputs, pipeline, request_retry_partial, tls, type, additional_properties].hash
228278
end
229279
end
230280
end

0 commit comments

Comments
 (0)