Skip to content

Commit e5236e4

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

8 files changed

+204
-16
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

services/observability_pipelines/src/v2/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ export { ObservabilityPipelineDiskBufferOptions } from "./models/ObservabilityPi
9595
export { ObservabilityPipelineElasticsearchDestination } from "./models/ObservabilityPipelineElasticsearchDestination";
9696
export { ObservabilityPipelineElasticsearchDestinationApiVersion } from "./models/ObservabilityPipelineElasticsearchDestinationApiVersion";
9797
export { ObservabilityPipelineElasticsearchDestinationAuth } from "./models/ObservabilityPipelineElasticsearchDestinationAuth";
98+
export { ObservabilityPipelineElasticsearchDestinationCompression } from "./models/ObservabilityPipelineElasticsearchDestinationCompression";
99+
export { ObservabilityPipelineElasticsearchDestinationCompressionAlgorithm } from "./models/ObservabilityPipelineElasticsearchDestinationCompressionAlgorithm";
98100
export { ObservabilityPipelineElasticsearchDestinationDataStream } from "./models/ObservabilityPipelineElasticsearchDestinationDataStream";
99101
export { ObservabilityPipelineElasticsearchDestinationType } from "./models/ObservabilityPipelineElasticsearchDestinationType";
100102
export { ObservabilityPipelineEnrichmentTableFile } from "./models/ObservabilityPipelineEnrichmentTableFile";

services/observability_pipelines/src/v2/models/ObservabilityPipelineConfigDestinationItem.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import { ObservabilityPipelineSyslogNgDestination } from "./ObservabilityPipelin
2929
* A destination for the pipeline.
3030
*/
3131
export type ObservabilityPipelineConfigDestinationItem =
32+
| ObservabilityPipelineElasticsearchDestination
3233
| ObservabilityPipelineHttpClientDestination
3334
| ObservabilityPipelineAmazonOpenSearchDestination
3435
| ObservabilityPipelineAmazonS3Destination
@@ -38,7 +39,6 @@ export type ObservabilityPipelineConfigDestinationItem =
3839
| ObservabilityPipelineCloudPremDestination
3940
| ObservabilityPipelineCrowdStrikeNextGenSiemDestination
4041
| ObservabilityPipelineDatadogLogsDestination
41-
| ObservabilityPipelineElasticsearchDestination
4242
| ObservabilityPipelineGoogleChronicleDestination
4343
| ObservabilityPipelineGoogleCloudStorageDestination
4444
| ObservabilityPipelineGooglePubSubDestination

services/observability_pipelines/src/v2/models/ObservabilityPipelineElasticsearchDestination.ts

Lines changed: 45 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@ import { AttributeTypeMap } from "@datadog/datadog-api-client";
33
import { ObservabilityPipelineBufferOptions } from "./ObservabilityPipelineBufferOptions";
44
import { ObservabilityPipelineElasticsearchDestinationApiVersion } from "./ObservabilityPipelineElasticsearchDestinationApiVersion";
55
import { ObservabilityPipelineElasticsearchDestinationAuth } from "./ObservabilityPipelineElasticsearchDestinationAuth";
6+
import { ObservabilityPipelineElasticsearchDestinationCompression } from "./ObservabilityPipelineElasticsearchDestinationCompression";
67
import { ObservabilityPipelineElasticsearchDestinationDataStream } from "./ObservabilityPipelineElasticsearchDestinationDataStream";
78
import { ObservabilityPipelineElasticsearchDestinationType } from "./ObservabilityPipelineElasticsearchDestinationType";
9+
import { ObservabilityPipelineTls } from "./ObservabilityPipelineTls";
810

911
/**
10-
* The `elasticsearch` destination writes logs to an Elasticsearch cluster.
12+
* The `elasticsearch` destination writes logs or metrics to an Elasticsearch cluster.
1113
*
12-
* **Supported pipeline types:** logs
14+
* **Supported pipeline types:** logs, metrics
1315
*/
1416
export class ObservabilityPipelineElasticsearchDestination {
1517
/**
@@ -26,9 +28,13 @@ export class ObservabilityPipelineElasticsearchDestination {
2628
*/
2729
"buffer"?: ObservabilityPipelineBufferOptions;
2830
/**
29-
* The index to write logs to in Elasticsearch.
31+
* The name of the index to write events to in Elasticsearch.
3032
*/
3133
"bulkIndex"?: string;
34+
/**
35+
* Compression configuration for the Elasticsearch destination.
36+
*/
37+
"compression"?: ObservabilityPipelineElasticsearchDestinationCompression;
3238
/**
3339
* Configuration options for writing to Elasticsearch Data Streams instead of a fixed index.
3440
*/
@@ -41,10 +47,26 @@ export class ObservabilityPipelineElasticsearchDestination {
4147
* The unique identifier for this component.
4248
*/
4349
"id": string;
50+
/**
51+
* The name of the field used as the document ID in Elasticsearch.
52+
*/
53+
"idKey"?: string;
4454
/**
4555
* A list of component IDs whose output is used as the `input` for this component.
4656
*/
4757
"inputs": Array<string>;
58+
/**
59+
* The name of an Elasticsearch ingest pipeline to apply to events before indexing.
60+
*/
61+
"pipeline"?: string;
62+
/**
63+
* When `true`, retries failed partial bulk requests when some events in a batch fail while others succeed.
64+
*/
65+
"requestRetryPartial"?: boolean;
66+
/**
67+
* Configuration for enabling TLS encryption between the pipeline component and external services.
68+
*/
69+
"tls"?: ObservabilityPipelineTls;
4870
/**
4971
* The destination type. The value should always be `elasticsearch`.
5072
*/
@@ -80,6 +102,10 @@ export class ObservabilityPipelineElasticsearchDestination {
80102
baseName: "bulk_index",
81103
type: "string",
82104
},
105+
compression: {
106+
baseName: "compression",
107+
type: "ObservabilityPipelineElasticsearchDestinationCompression",
108+
},
83109
dataStream: {
84110
baseName: "data_stream",
85111
type: "ObservabilityPipelineElasticsearchDestinationDataStream",
@@ -93,11 +119,27 @@ export class ObservabilityPipelineElasticsearchDestination {
93119
type: "string",
94120
required: true,
95121
},
122+
idKey: {
123+
baseName: "id_key",
124+
type: "string",
125+
},
96126
inputs: {
97127
baseName: "inputs",
98128
type: "Array<string>",
99129
required: true,
100130
},
131+
pipeline: {
132+
baseName: "pipeline",
133+
type: "string",
134+
},
135+
requestRetryPartial: {
136+
baseName: "request_retry_partial",
137+
type: "boolean",
138+
},
139+
tls: {
140+
baseName: "tls",
141+
type: "ObservabilityPipelineTls",
142+
},
101143
type: {
102144
baseName: "type",
103145
type: "ObservabilityPipelineElasticsearchDestinationType",
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
import { AttributeTypeMap } from "@datadog/datadog-api-client";
2+
3+
import { ObservabilityPipelineElasticsearchDestinationCompressionAlgorithm } from "./ObservabilityPipelineElasticsearchDestinationCompressionAlgorithm";
4+
5+
/**
6+
* Compression configuration for the Elasticsearch destination.
7+
*/
8+
export class ObservabilityPipelineElasticsearchDestinationCompression {
9+
/**
10+
* The compression algorithm applied when sending data to Elasticsearch.
11+
*/
12+
"algorithm": ObservabilityPipelineElasticsearchDestinationCompressionAlgorithm;
13+
/**
14+
* The compression level. Only applicable for `gzip`, `zlib`, and `zstd` algorithms.
15+
*/
16+
"level"?: number;
17+
/**
18+
* A container for additional, undeclared properties.
19+
* This is a holder for any undeclared properties as specified with
20+
* the 'additionalProperties' keyword in the OAS document.
21+
*/
22+
"additionalProperties"?: { [key: string]: any };
23+
/**
24+
* @ignore
25+
*/
26+
"_unparsed"?: boolean;
27+
28+
/**
29+
* @ignore
30+
*/
31+
static readonly attributeTypeMap: AttributeTypeMap = {
32+
algorithm: {
33+
baseName: "algorithm",
34+
type: "ObservabilityPipelineElasticsearchDestinationCompressionAlgorithm",
35+
required: true,
36+
},
37+
level: {
38+
baseName: "level",
39+
type: "number",
40+
format: "int64",
41+
},
42+
additionalProperties: {
43+
baseName: "additionalProperties",
44+
type: "{ [key: string]: any; }",
45+
},
46+
};
47+
48+
/**
49+
* @ignore
50+
*/
51+
static getAttributeTypeMap(): AttributeTypeMap {
52+
return ObservabilityPipelineElasticsearchDestinationCompression.attributeTypeMap;
53+
}
54+
55+
public constructor() {}
56+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { UnparsedObject } from "@datadog/datadog-api-client";
2+
3+
/**
4+
* The compression algorithm applied when sending data to Elasticsearch.
5+
*/
6+
export type ObservabilityPipelineElasticsearchDestinationCompressionAlgorithm =
7+
| typeof NONE
8+
| typeof GZIP
9+
| typeof ZLIB
10+
| typeof ZSTD
11+
| typeof SNAPPY
12+
| UnparsedObject;
13+
export const NONE = "none";
14+
export const GZIP = "gzip";
15+
export const ZLIB = "zlib";
16+
export const ZSTD = "zstd";
17+
export const SNAPPY = "snappy";

services/observability_pipelines/src/v2/models/ObservabilityPipelineElasticsearchDestinationDataStream.ts

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,25 @@ import { AttributeTypeMap } from "@datadog/datadog-api-client";
55
*/
66
export class ObservabilityPipelineElasticsearchDestinationDataStream {
77
/**
8-
* The data stream dataset for your logs. This groups logs by their source or application.
8+
* When `true`, automatically routes events to the appropriate data stream based on the event content.
9+
*/
10+
"autoRouting"?: boolean;
11+
/**
12+
* The data stream dataset. This groups events by their source or application.
913
*/
1014
"dataset"?: string;
1115
/**
12-
* The data stream type for your logs. This determines how logs are categorized within the data stream.
16+
* The data stream type. This determines how events are categorized within the data stream.
1317
*/
1418
"dtype"?: string;
1519
/**
16-
* The data stream namespace for your logs. This separates logs into different environments or domains.
20+
* The data stream namespace. This separates events into different environments or domains.
1721
*/
1822
"namespace"?: string;
23+
/**
24+
* When `true`, synchronizes data stream fields with the Elasticsearch index mapping.
25+
*/
26+
"syncFields"?: boolean;
1927
/**
2028
* A container for additional, undeclared properties.
2129
* This is a holder for any undeclared properties as specified with
@@ -31,6 +39,10 @@ export class ObservabilityPipelineElasticsearchDestinationDataStream {
3139
* @ignore
3240
*/
3341
static readonly attributeTypeMap: AttributeTypeMap = {
42+
autoRouting: {
43+
baseName: "auto_routing",
44+
type: "boolean",
45+
},
3446
dataset: {
3547
baseName: "dataset",
3648
type: "string",
@@ -43,6 +55,10 @@ export class ObservabilityPipelineElasticsearchDestinationDataStream {
4355
baseName: "namespace",
4456
type: "string",
4557
},
58+
syncFields: {
59+
baseName: "sync_fields",
60+
type: "boolean",
61+
},
4662
additionalProperties: {
4763
baseName: "additionalProperties",
4864
type: "{ [key: string]: any; }",

0 commit comments

Comments
 (0)