Skip to content

Commit 46aa7c7

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Adding Buffer options to Observability Pipeline Destinations (#3676)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 1ec37a9 commit 46aa7c7

27 files changed

Lines changed: 1629 additions & 31 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6766,6 +6766,8 @@ components:
67666766
description: Optional prefix for blobs written to the container.
67676767
example: logs/
67686768
type: string
6769+
buffer:
6770+
$ref: '#/components/schemas/ObservabilityPipelineBufferOptions'
67696771
container_name:
67706772
description: The name of the Azure Blob Storage container to store logs
67716773
in.
@@ -36391,6 +36393,8 @@ components:
3639136393

3639236394
**Supported pipeline types:** logs'
3639336395
properties:
36396+
buffer:
36397+
$ref: '#/components/schemas/ObservabilityPipelineBufferOptions'
3639436398
client_id:
3639536399
description: Azure AD client ID used for authentication.
3639636400
example: a1b2c3d4-5678-90ab-cdef-1234567890ab
@@ -38337,6 +38341,8 @@ components:
3833738341
properties:
3833838342
auth:
3833938343
$ref: '#/components/schemas/ObservabilityPipelineAmazonOpenSearchDestinationAuth'
38344+
buffer:
38345+
$ref: '#/components/schemas/ObservabilityPipelineBufferOptions'
3834038346
bulk_index:
3834138347
description: The index to write logs to.
3834238348
example: logs-index
@@ -38418,6 +38424,8 @@ components:
3841838424
description: S3 bucket name.
3841938425
example: error-logs
3842038426
type: string
38427+
buffer:
38428+
$ref: '#/components/schemas/ObservabilityPipelineBufferOptions'
3842138429
id:
3842238430
description: Unique identifier for the destination component.
3842338431
example: amazon-s3-destination
@@ -38539,6 +38547,8 @@ components:
3853938547
description: Name of the Amazon S3 bucket in Security Lake (3-63 characters).
3854038548
example: security-lake-bucket
3854138549
type: string
38550+
buffer:
38551+
$ref: '#/components/schemas/ObservabilityPipelineBufferOptions'
3854238552
custom_source_name:
3854338553
description: Custom source name for the logs in Security Lake.
3854438554
example: my-custom-source
@@ -38598,6 +38608,39 @@ components:
3859838608
role session.
3859938609
type: string
3860038610
type: object
38611+
ObservabilityPipelineBufferOptions:
38612+
description: Configuration for buffer settings on destination components.
38613+
oneOf:
38614+
- $ref: '#/components/schemas/ObservabilityPipelineDiskBufferOptions'
38615+
- $ref: '#/components/schemas/ObservabilityPipelineMemoryBufferOptions'
38616+
- $ref: '#/components/schemas/ObservabilityPipelineMemoryBufferSizeOptions'
38617+
ObservabilityPipelineBufferOptionsDiskType:
38618+
default: disk
38619+
description: The type of the buffer that will be configured, a disk buffer.
38620+
enum:
38621+
- disk
38622+
type: string
38623+
x-enum-varnames:
38624+
- DISK
38625+
ObservabilityPipelineBufferOptionsMemoryType:
38626+
default: memory
38627+
description: The type of the buffer that will be configured, a memory buffer.
38628+
enum:
38629+
- memory
38630+
type: string
38631+
x-enum-varnames:
38632+
- MEMORY
38633+
ObservabilityPipelineBufferOptionsWhenFull:
38634+
default: block
38635+
description: Behavior when the buffer is full (block and stop accepting new
38636+
events, or drop new events)
38637+
enum:
38638+
- block
38639+
- drop_newest
38640+
type: string
38641+
x-enum-varnames:
38642+
- BLOCK
38643+
- DROP_NEWEST
3860138644
ObservabilityPipelineCloudPremDestination:
3860238645
description: 'The `cloud_prem` destination sends logs to Datadog CloudPrem.
3860338646

@@ -38868,6 +38911,8 @@ components:
3886838911

3886938912
**Supported pipeline types:** logs'
3887038913
properties:
38914+
buffer:
38915+
$ref: '#/components/schemas/ObservabilityPipelineBufferOptions'
3887138916
compression:
3887238917
$ref: '#/components/schemas/ObservabilityPipelineCrowdStrikeNextGenSiemDestinationCompression'
3887338918
encoding:
@@ -39093,6 +39138,8 @@ components:
3909339138

3909439139
**Supported pipeline types:** logs'
3909539140
properties:
39141+
buffer:
39142+
$ref: '#/components/schemas/ObservabilityPipelineBufferOptions'
3909639143
id:
3909739144
description: The unique identifier for this component.
3909839145
example: datadog-logs-destination
@@ -39347,6 +39394,19 @@ components:
3934739394
type: string
3934839395
x-enum-varnames:
3934939396
- DEDUPE
39397+
ObservabilityPipelineDiskBufferOptions:
39398+
description: Options for configuring a disk buffer.
39399+
properties:
39400+
max_size:
39401+
description: Maximum size of the disk buffer.
39402+
example: 4096
39403+
format: int64
39404+
type: integer
39405+
type:
39406+
$ref: '#/components/schemas/ObservabilityPipelineBufferOptionsDiskType'
39407+
when_full:
39408+
$ref: '#/components/schemas/ObservabilityPipelineBufferOptionsWhenFull'
39409+
type: object
3935039410
ObservabilityPipelineElasticsearchDestination:
3935139411
description: 'The `elasticsearch` destination writes logs to an Elasticsearch
3935239412
cluster.
@@ -39356,6 +39416,8 @@ components:
3935639416
properties:
3935739417
api_version:
3935839418
$ref: '#/components/schemas/ObservabilityPipelineElasticsearchDestinationApiVersion'
39419+
buffer:
39420+
$ref: '#/components/schemas/ObservabilityPipelineBufferOptions'
3935939421
bulk_index:
3936039422
description: The index to write logs to in Elasticsearch.
3936139423
example: logs-index
@@ -39901,6 +39963,8 @@ components:
3990139963
properties:
3990239964
auth:
3990339965
$ref: '#/components/schemas/ObservabilityPipelineGcpAuth'
39966+
buffer:
39967+
$ref: '#/components/schemas/ObservabilityPipelineBufferOptions'
3990439968
customer_id:
3990539969
description: The Google Chronicle customer ID.
3990639970
example: abcdefg123456789
@@ -39969,6 +40033,8 @@ components:
3996940033
description: Name of the GCS bucket.
3997040034
example: error-logs
3997140035
type: string
40036+
buffer:
40037+
$ref: '#/components/schemas/ObservabilityPipelineBufferOptions'
3997240038
id:
3997340039
description: Unique identifier for the destination component.
3997440040
example: gcs-destination
@@ -40053,6 +40119,8 @@ components:
4005340119
properties:
4005440120
auth:
4005540121
$ref: '#/components/schemas/ObservabilityPipelineGcpAuth'
40122+
buffer:
40123+
$ref: '#/components/schemas/ObservabilityPipelineBufferOptions'
4005640124
encoding:
4005740125
$ref: '#/components/schemas/ObservabilityPipelineGooglePubSubDestinationEncoding'
4005840126
id:
@@ -40579,6 +40647,28 @@ components:
4057940647
type: string
4058040648
x-enum-varnames:
4058140649
- LOGSTASH
40650+
ObservabilityPipelineMemoryBufferOptions:
40651+
description: Options for configuring a memory buffer by byte size.
40652+
properties:
40653+
max_size:
40654+
description: Maximum size of the memory buffer.
40655+
example: 4096
40656+
format: int64
40657+
type: integer
40658+
type:
40659+
$ref: '#/components/schemas/ObservabilityPipelineBufferOptionsMemoryType'
40660+
type: object
40661+
ObservabilityPipelineMemoryBufferSizeOptions:
40662+
description: Options for configuring a memory buffer by queue length.
40663+
properties:
40664+
max_events:
40665+
description: Maximum events for the memory buffer.
40666+
example: 500
40667+
format: int64
40668+
type: integer
40669+
type:
40670+
$ref: '#/components/schemas/ObservabilityPipelineBufferOptionsMemoryType'
40671+
type: object
4058240672
ObservabilityPipelineMetadataEntry:
4058340673
description: A custom metadata entry.
4058440674
properties:
@@ -40701,6 +40791,8 @@ components:
4070140791

4070240792
**Supported pipeline types:** logs'
4070340793
properties:
40794+
buffer:
40795+
$ref: '#/components/schemas/ObservabilityPipelineBufferOptions'
4070440796
id:
4070540797
description: The unique identifier for this component.
4070640798
example: new-relic-destination
@@ -40847,6 +40939,8 @@ components:
4084740939

4084840940
**Supported pipeline types:** logs'
4084940941
properties:
40942+
buffer:
40943+
$ref: '#/components/schemas/ObservabilityPipelineBufferOptions'
4085040944
bulk_index:
4085140945
description: The index to write logs to.
4085240946
example: logs-index
@@ -41560,6 +41654,8 @@ components:
4156041654

4156141655
**Supported pipeline types:** logs'
4156241656
properties:
41657+
buffer:
41658+
$ref: '#/components/schemas/ObservabilityPipelineBufferOptions'
4156341659
id:
4156441660
description: The unique identifier for this component.
4156541661
example: rsyslog-destination
@@ -42065,6 +42161,8 @@ components:
4206542161

4206642162
**Supported pipeline types:** logs'
4206742163
properties:
42164+
buffer:
42165+
$ref: '#/components/schemas/ObservabilityPipelineBufferOptions'
4206842166
id:
4206942167
description: The unique identifier for this component.
4207042168
example: sentinelone-destination
@@ -42119,6 +42217,8 @@ components:
4211942217

4212042218
**Supported pipeline types:** logs'
4212142219
properties:
42220+
buffer:
42221+
$ref: '#/components/schemas/ObservabilityPipelineBufferOptions'
4212242222
encoding:
4212342223
$ref: '#/components/schemas/ObservabilityPipelineSocketDestinationEncoding'
4212442224
framing:
@@ -42495,6 +42595,8 @@ components:
4249542595
If `false`, Splunk assigns the time the event was received.'
4249642596
example: true
4249742597
type: boolean
42598+
buffer:
42599+
$ref: '#/components/schemas/ObservabilityPipelineBufferOptions'
4249842600
encoding:
4249942601
$ref: '#/components/schemas/ObservabilityPipelineSplunkHecDestinationEncoding'
4250042602
id:
@@ -42619,6 +42721,8 @@ components:
4261942721

4262042722
**Supported pipeline types:** logs'
4262142723
properties:
42724+
buffer:
42725+
$ref: '#/components/schemas/ObservabilityPipelineBufferOptions'
4262242726
encoding:
4262342727
$ref: '#/components/schemas/ObservabilityPipelineSumoLogicDestinationEncoding'
4262442728
header_custom_fields:
@@ -42732,6 +42836,8 @@ components:
4273242836

4273342837
**Supported pipeline types:** logs'
4273442838
properties:
42839+
buffer:
42840+
$ref: '#/components/schemas/ObservabilityPipelineBufferOptions'
4273542841
id:
4273642842
description: The unique identifier for this component.
4273742843
example: syslog-ng-destination

api/datadogV2/model_azure_storage_destination.go

Lines changed: 41 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ import (
1616
type AzureStorageDestination struct {
1717
// Optional prefix for blobs written to the container.
1818
BlobPrefix *string `json:"blob_prefix,omitempty"`
19+
// Configuration for buffer settings on destination components.
20+
Buffer *ObservabilityPipelineBufferOptions `json:"buffer,omitempty"`
1921
// The name of the Azure Blob Storage container to store logs in.
2022
ContainerName string `json:"container_name"`
2123
// The unique identifier for this component.
@@ -80,6 +82,34 @@ func (o *AzureStorageDestination) SetBlobPrefix(v string) {
8082
o.BlobPrefix = &v
8183
}
8284

85+
// GetBuffer returns the Buffer field value if set, zero value otherwise.
86+
func (o *AzureStorageDestination) GetBuffer() ObservabilityPipelineBufferOptions {
87+
if o == nil || o.Buffer == nil {
88+
var ret ObservabilityPipelineBufferOptions
89+
return ret
90+
}
91+
return *o.Buffer
92+
}
93+
94+
// GetBufferOk returns a tuple with the Buffer field value if set, nil otherwise
95+
// and a boolean to check if the value has been set.
96+
func (o *AzureStorageDestination) GetBufferOk() (*ObservabilityPipelineBufferOptions, bool) {
97+
if o == nil || o.Buffer == nil {
98+
return nil, false
99+
}
100+
return o.Buffer, true
101+
}
102+
103+
// HasBuffer returns a boolean if a field has been set.
104+
func (o *AzureStorageDestination) HasBuffer() bool {
105+
return o != nil && o.Buffer != nil
106+
}
107+
108+
// SetBuffer gets a reference to the given ObservabilityPipelineBufferOptions and assigns it to the Buffer field.
109+
func (o *AzureStorageDestination) SetBuffer(v ObservabilityPipelineBufferOptions) {
110+
o.Buffer = &v
111+
}
112+
83113
// GetContainerName returns the ContainerName field value.
84114
func (o *AzureStorageDestination) GetContainerName() string {
85115
if o == nil {
@@ -181,6 +211,9 @@ func (o AzureStorageDestination) MarshalJSON() ([]byte, error) {
181211
if o.BlobPrefix != nil {
182212
toSerialize["blob_prefix"] = o.BlobPrefix
183213
}
214+
if o.Buffer != nil {
215+
toSerialize["buffer"] = o.Buffer
216+
}
184217
toSerialize["container_name"] = o.ContainerName
185218
toSerialize["id"] = o.Id
186219
toSerialize["inputs"] = o.Inputs
@@ -195,11 +228,12 @@ func (o AzureStorageDestination) MarshalJSON() ([]byte, error) {
195228
// UnmarshalJSON deserializes the given payload.
196229
func (o *AzureStorageDestination) UnmarshalJSON(bytes []byte) (err error) {
197230
all := struct {
198-
BlobPrefix *string `json:"blob_prefix,omitempty"`
199-
ContainerName *string `json:"container_name"`
200-
Id *string `json:"id"`
201-
Inputs *[]string `json:"inputs"`
202-
Type *AzureStorageDestinationType `json:"type"`
231+
BlobPrefix *string `json:"blob_prefix,omitempty"`
232+
Buffer *ObservabilityPipelineBufferOptions `json:"buffer,omitempty"`
233+
ContainerName *string `json:"container_name"`
234+
Id *string `json:"id"`
235+
Inputs *[]string `json:"inputs"`
236+
Type *AzureStorageDestinationType `json:"type"`
203237
}{}
204238
if err = datadog.Unmarshal(bytes, &all); err != nil {
205239
return datadog.Unmarshal(bytes, &o.UnparsedObject)
@@ -218,13 +252,14 @@ func (o *AzureStorageDestination) UnmarshalJSON(bytes []byte) (err error) {
218252
}
219253
additionalProperties := make(map[string]interface{})
220254
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
221-
datadog.DeleteKeys(additionalProperties, &[]string{"blob_prefix", "container_name", "id", "inputs", "type"})
255+
datadog.DeleteKeys(additionalProperties, &[]string{"blob_prefix", "buffer", "container_name", "id", "inputs", "type"})
222256
} else {
223257
return err
224258
}
225259

226260
hasInvalidField := false
227261
o.BlobPrefix = all.BlobPrefix
262+
o.Buffer = all.Buffer
228263
o.ContainerName = *all.ContainerName
229264
o.Id = *all.Id
230265
o.Inputs = *all.Inputs

0 commit comments

Comments
 (0)