Skip to content

Commit b415cf4

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add display_name to Observability Pipeline processors (#3538)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 82da2dc commit b415cf4

39 files changed

Lines changed: 879 additions & 158 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35144,6 +35144,8 @@ components:
3514435144
description: The `add_env_vars` processor adds environment variable values to
3514535145
log events.
3514635146
properties:
35147+
display_name:
35148+
$ref: '#/components/schemas/ObservabilityPipelineComponentDisplayName'
3514735149
enabled:
3514835150
description: Whether this processor is enabled.
3514935151
example: true
@@ -35199,6 +35201,8 @@ components:
3519935201
ObservabilityPipelineAddFieldsProcessor:
3520035202
description: The `add_fields` processor adds static key-value fields to logs.
3520135203
properties:
35204+
display_name:
35205+
$ref: '#/components/schemas/ObservabilityPipelineComponentDisplayName'
3520235206
enabled:
3520335207
description: Whether this processor is enabled.
3520435208
example: true
@@ -35515,6 +35519,10 @@ components:
3551535519
role session.
3551635520
type: string
3551735521
type: object
35522+
ObservabilityPipelineComponentDisplayName:
35523+
description: The display name for a component.
35524+
example: my component
35525+
type: string
3551835526
ObservabilityPipelineConfig:
3551935527
description: Specifies the pipeline's configuration, including its sources,
3552035528
processors, and destinations.
@@ -35605,6 +35613,8 @@ components:
3560535613
include: status:error
3560635614
type: filter
3560735615
properties:
35616+
display_name:
35617+
$ref: '#/components/schemas/ObservabilityPipelineComponentDisplayName'
3560835618
enabled:
3560935619
description: Whether this processor group is enabled.
3561035620
example: true
@@ -35768,6 +35778,8 @@ components:
3576835778
Remap Language (VRL)](https://vector.dev/docs/reference/vrl/) scripts with
3576935779
advanced filtering capabilities.
3577035780
properties:
35781+
display_name:
35782+
$ref: '#/components/schemas/ObservabilityPipelineComponentDisplayName'
3577135783
enabled:
3577235784
description: Whether this processor is enabled.
3577335785
example: true
@@ -35935,6 +35947,8 @@ components:
3593535947
properties:
3593635948
action:
3593735949
$ref: '#/components/schemas/ObservabilityPipelineDatadogTagsProcessorAction'
35950+
display_name:
35951+
$ref: '#/components/schemas/ObservabilityPipelineComponentDisplayName'
3593835952
enabled:
3593935953
description: Whether this processor is enabled.
3594035954
example: true
@@ -36016,6 +36030,8 @@ components:
3601636030
ObservabilityPipelineDedupeProcessor:
3601736031
description: The `dedupe` processor removes duplicate fields in log events.
3601836032
properties:
36033+
display_name:
36034+
$ref: '#/components/schemas/ObservabilityPipelineComponentDisplayName'
3601936035
enabled:
3602036036
description: Whether this processor is enabled.
3602136037
example: true
@@ -36253,6 +36269,8 @@ components:
3625336269
description: The `enrichment_table` processor enriches logs using a static CSV
3625436270
file or GeoIP database.
3625536271
properties:
36272+
display_name:
36273+
$ref: '#/components/schemas/ObservabilityPipelineComponentDisplayName'
3625636274
enabled:
3625736275
description: Whether this processor is enabled.
3625836276
example: true
@@ -36312,6 +36330,8 @@ components:
3631236330
on a Datadog search query. Logs that match the `include` query are passed
3631336331
through; others are discarded.
3631436332
properties:
36333+
display_name:
36334+
$ref: '#/components/schemas/ObservabilityPipelineComponentDisplayName'
3631536335
enabled:
3631636336
description: Whether this processor is enabled.
3631736337
example: true
@@ -36414,6 +36434,8 @@ components:
3641436434
Metrics can be counters, gauges, or distributions and optionally grouped by
3641536435
log fields.'
3641636436
properties:
36437+
display_name:
36438+
$ref: '#/components/schemas/ObservabilityPipelineComponentDisplayName'
3641736439
enabled:
3641836440
description: Whether this processor is enabled.
3641936441
example: true
@@ -37035,6 +37057,8 @@ components:
3703537057
description: The `ocsf_mapper` processor transforms logs into the OCSF schema
3703637058
using a predefined mapping configuration.
3703737059
properties:
37060+
display_name:
37061+
$ref: '#/components/schemas/ObservabilityPipelineComponentDisplayName'
3703837062
enabled:
3703937063
description: Whether this processor is enabled.
3704037064
example: true
@@ -37166,6 +37190,8 @@ components:
3716637190
by Datadog.
3716737191
example: true
3716837192
type: boolean
37193+
display_name:
37194+
$ref: '#/components/schemas/ObservabilityPipelineComponentDisplayName'
3716937195
enabled:
3717037196
description: Whether this processor is enabled.
3717137197
example: true
@@ -37278,6 +37304,8 @@ components:
3727837304
and flattens it into the event. This is useful when logs contain embedded
3727937305
JSON as a string.
3728037306
properties:
37307+
display_name:
37308+
$ref: '#/components/schemas/ObservabilityPipelineComponentDisplayName'
3728137309
enabled:
3728237310
description: Whether this processor is enabled.
3728337311
example: true
@@ -37331,6 +37359,8 @@ components:
3733137359
a specified filter. When the configured daily quota is met, the processor
3733237360
can drop or alert.
3733337361
properties:
37362+
display_name:
37363+
$ref: '#/components/schemas/ObservabilityPipelineComponentDisplayName'
3733437364
drop_events:
3733537365
description: If set to `true`, logs that matched the quota filter and sent
3733637366
after the quota has been met are dropped; only logs that did not match
@@ -37462,6 +37492,8 @@ components:
3746237492
description: The `reduce` processor aggregates and merges logs based on matching
3746337493
keys and merge strategies.
3746437494
properties:
37495+
display_name:
37496+
$ref: '#/components/schemas/ObservabilityPipelineComponentDisplayName'
3746537497
enabled:
3746637498
description: Whether this processor is enabled.
3746737499
example: true
@@ -37554,6 +37586,8 @@ components:
3755437586
ObservabilityPipelineRemoveFieldsProcessor:
3755537587
description: The `remove_fields` processor deletes specified fields from logs.
3755637588
properties:
37589+
display_name:
37590+
$ref: '#/components/schemas/ObservabilityPipelineComponentDisplayName'
3755737591
enabled:
3755837592
description: Whether this processor is enabled.
3755937593
example: true
@@ -37598,6 +37632,8 @@ components:
3759837632
ObservabilityPipelineRenameFieldsProcessor:
3759937633
description: The `rename_fields` processor changes field names.
3760037634
properties:
37635+
display_name:
37636+
$ref: '#/components/schemas/ObservabilityPipelineComponentDisplayName'
3760137637
enabled:
3760237638
description: Whether this processor is enabled.
3760337639
example: true
@@ -37733,6 +37769,8 @@ components:
3773337769
description: The `sample` processor allows probabilistic sampling of logs at
3773437770
a fixed rate.
3773537771
properties:
37772+
display_name:
37773+
$ref: '#/components/schemas/ObservabilityPipelineComponentDisplayName'
3773637774
enabled:
3773737775
description: Whether this processor is enabled.
3773837776
example: true
@@ -37780,6 +37818,8 @@ components:
3778037818
description: The `sensitive_data_scanner` processor detects and optionally redacts
3778137819
sensitive data in log events.
3778237820
properties:
37821+
display_name:
37822+
$ref: '#/components/schemas/ObservabilityPipelineComponentDisplayName'
3778337823
enabled:
3778437824
description: Whether this processor is enabled.
3778537825
example: true
@@ -38769,6 +38809,8 @@ components:
3876938809
description: The `throttle` processor limits the number of events that pass
3877038810
through over a given time window.
3877138811
properties:
38812+
display_name:
38813+
$ref: '#/components/schemas/ObservabilityPipelineComponentDisplayName'
3877238814
enabled:
3877338815
description: Whether this processor is enabled.
3877438816
example: true

api/datadogV2/model_observability_pipeline_add_env_vars_processor.go

Lines changed: 41 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ import (
1212

1313
// ObservabilityPipelineAddEnvVarsProcessor The `add_env_vars` processor adds environment variable values to log events.
1414
type ObservabilityPipelineAddEnvVarsProcessor struct {
15+
// The display name for a component.
16+
DisplayName *string `json:"display_name,omitempty"`
1517
// Whether this processor is enabled.
1618
Enabled bool `json:"enabled"`
1719
// The unique identifier for this component. Used to reference this processor in the pipeline.
@@ -51,6 +53,34 @@ func NewObservabilityPipelineAddEnvVarsProcessorWithDefaults() *ObservabilityPip
5153
return &this
5254
}
5355

56+
// GetDisplayName returns the DisplayName field value if set, zero value otherwise.
57+
func (o *ObservabilityPipelineAddEnvVarsProcessor) GetDisplayName() string {
58+
if o == nil || o.DisplayName == nil {
59+
var ret string
60+
return ret
61+
}
62+
return *o.DisplayName
63+
}
64+
65+
// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise
66+
// and a boolean to check if the value has been set.
67+
func (o *ObservabilityPipelineAddEnvVarsProcessor) GetDisplayNameOk() (*string, bool) {
68+
if o == nil || o.DisplayName == nil {
69+
return nil, false
70+
}
71+
return o.DisplayName, true
72+
}
73+
74+
// HasDisplayName returns a boolean if a field has been set.
75+
func (o *ObservabilityPipelineAddEnvVarsProcessor) HasDisplayName() bool {
76+
return o != nil && o.DisplayName != nil
77+
}
78+
79+
// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field.
80+
func (o *ObservabilityPipelineAddEnvVarsProcessor) SetDisplayName(v string) {
81+
o.DisplayName = &v
82+
}
83+
5484
// GetEnabled returns the Enabled field value.
5585
func (o *ObservabilityPipelineAddEnvVarsProcessor) GetEnabled() bool {
5686
if o == nil {
@@ -172,6 +202,9 @@ func (o ObservabilityPipelineAddEnvVarsProcessor) MarshalJSON() ([]byte, error)
172202
if o.UnparsedObject != nil {
173203
return datadog.Marshal(o.UnparsedObject)
174204
}
205+
if o.DisplayName != nil {
206+
toSerialize["display_name"] = o.DisplayName
207+
}
175208
toSerialize["enabled"] = o.Enabled
176209
toSerialize["id"] = o.Id
177210
toSerialize["include"] = o.Include
@@ -187,11 +220,12 @@ func (o ObservabilityPipelineAddEnvVarsProcessor) MarshalJSON() ([]byte, error)
187220
// UnmarshalJSON deserializes the given payload.
188221
func (o *ObservabilityPipelineAddEnvVarsProcessor) UnmarshalJSON(bytes []byte) (err error) {
189222
all := struct {
190-
Enabled *bool `json:"enabled"`
191-
Id *string `json:"id"`
192-
Include *string `json:"include"`
193-
Type *ObservabilityPipelineAddEnvVarsProcessorType `json:"type"`
194-
Variables *[]ObservabilityPipelineAddEnvVarsProcessorVariable `json:"variables"`
223+
DisplayName *string `json:"display_name,omitempty"`
224+
Enabled *bool `json:"enabled"`
225+
Id *string `json:"id"`
226+
Include *string `json:"include"`
227+
Type *ObservabilityPipelineAddEnvVarsProcessorType `json:"type"`
228+
Variables *[]ObservabilityPipelineAddEnvVarsProcessorVariable `json:"variables"`
195229
}{}
196230
if err = datadog.Unmarshal(bytes, &all); err != nil {
197231
return datadog.Unmarshal(bytes, &o.UnparsedObject)
@@ -213,12 +247,13 @@ func (o *ObservabilityPipelineAddEnvVarsProcessor) UnmarshalJSON(bytes []byte) (
213247
}
214248
additionalProperties := make(map[string]interface{})
215249
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
216-
datadog.DeleteKeys(additionalProperties, &[]string{"enabled", "id", "include", "type", "variables"})
250+
datadog.DeleteKeys(additionalProperties, &[]string{"display_name", "enabled", "id", "include", "type", "variables"})
217251
} else {
218252
return err
219253
}
220254

221255
hasInvalidField := false
256+
o.DisplayName = all.DisplayName
222257
o.Enabled = *all.Enabled
223258
o.Id = *all.Id
224259
o.Include = *all.Include

api/datadogV2/model_observability_pipeline_add_fields_processor.go

Lines changed: 41 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ import (
1212

1313
// ObservabilityPipelineAddFieldsProcessor The `add_fields` processor adds static key-value fields to logs.
1414
type ObservabilityPipelineAddFieldsProcessor struct {
15+
// The display name for a component.
16+
DisplayName *string `json:"display_name,omitempty"`
1517
// Whether this processor is enabled.
1618
Enabled bool `json:"enabled"`
1719
// A list of static fields (key-value pairs) that is added to each log event processed by this component.
@@ -51,6 +53,34 @@ func NewObservabilityPipelineAddFieldsProcessorWithDefaults() *ObservabilityPipe
5153
return &this
5254
}
5355

56+
// GetDisplayName returns the DisplayName field value if set, zero value otherwise.
57+
func (o *ObservabilityPipelineAddFieldsProcessor) GetDisplayName() string {
58+
if o == nil || o.DisplayName == nil {
59+
var ret string
60+
return ret
61+
}
62+
return *o.DisplayName
63+
}
64+
65+
// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise
66+
// and a boolean to check if the value has been set.
67+
func (o *ObservabilityPipelineAddFieldsProcessor) GetDisplayNameOk() (*string, bool) {
68+
if o == nil || o.DisplayName == nil {
69+
return nil, false
70+
}
71+
return o.DisplayName, true
72+
}
73+
74+
// HasDisplayName returns a boolean if a field has been set.
75+
func (o *ObservabilityPipelineAddFieldsProcessor) HasDisplayName() bool {
76+
return o != nil && o.DisplayName != nil
77+
}
78+
79+
// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field.
80+
func (o *ObservabilityPipelineAddFieldsProcessor) SetDisplayName(v string) {
81+
o.DisplayName = &v
82+
}
83+
5484
// GetEnabled returns the Enabled field value.
5585
func (o *ObservabilityPipelineAddFieldsProcessor) GetEnabled() bool {
5686
if o == nil {
@@ -172,6 +202,9 @@ func (o ObservabilityPipelineAddFieldsProcessor) MarshalJSON() ([]byte, error) {
172202
if o.UnparsedObject != nil {
173203
return datadog.Marshal(o.UnparsedObject)
174204
}
205+
if o.DisplayName != nil {
206+
toSerialize["display_name"] = o.DisplayName
207+
}
175208
toSerialize["enabled"] = o.Enabled
176209
toSerialize["fields"] = o.Fields
177210
toSerialize["id"] = o.Id
@@ -187,11 +220,12 @@ func (o ObservabilityPipelineAddFieldsProcessor) MarshalJSON() ([]byte, error) {
187220
// UnmarshalJSON deserializes the given payload.
188221
func (o *ObservabilityPipelineAddFieldsProcessor) UnmarshalJSON(bytes []byte) (err error) {
189222
all := struct {
190-
Enabled *bool `json:"enabled"`
191-
Fields *[]ObservabilityPipelineFieldValue `json:"fields"`
192-
Id *string `json:"id"`
193-
Include *string `json:"include"`
194-
Type *ObservabilityPipelineAddFieldsProcessorType `json:"type"`
223+
DisplayName *string `json:"display_name,omitempty"`
224+
Enabled *bool `json:"enabled"`
225+
Fields *[]ObservabilityPipelineFieldValue `json:"fields"`
226+
Id *string `json:"id"`
227+
Include *string `json:"include"`
228+
Type *ObservabilityPipelineAddFieldsProcessorType `json:"type"`
195229
}{}
196230
if err = datadog.Unmarshal(bytes, &all); err != nil {
197231
return datadog.Unmarshal(bytes, &o.UnparsedObject)
@@ -213,12 +247,13 @@ func (o *ObservabilityPipelineAddFieldsProcessor) UnmarshalJSON(bytes []byte) (e
213247
}
214248
additionalProperties := make(map[string]interface{})
215249
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
216-
datadog.DeleteKeys(additionalProperties, &[]string{"enabled", "fields", "id", "include", "type"})
250+
datadog.DeleteKeys(additionalProperties, &[]string{"display_name", "enabled", "fields", "id", "include", "type"})
217251
} else {
218252
return err
219253
}
220254

221255
hasInvalidField := false
256+
o.DisplayName = all.DisplayName
222257
o.Enabled = *all.Enabled
223258
o.Fields = *all.Fields
224259
o.Id = *all.Id

0 commit comments

Comments
 (0)