Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 36 additions & 25 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70300,6 +70300,8 @@ components:
$ref: "#/components/schemas/ObservabilityPipelineTagCardinalityLimitProcessorPerMetricLimit"
maxItems: 100
type: array
tracking_mode:
$ref: "#/components/schemas/ObservabilityPipelineTagCardinalityLimitProcessorTrackingMode"
type:
$ref: "#/components/schemas/ObservabilityPipelineTagCardinalityLimitProcessorType"
value_limit:
Expand All @@ -70314,6 +70316,7 @@ components:
- type
- include
- limit_exceeded_action
- tracking_mode
- value_limit
- enabled
type: object
Expand All @@ -70328,6 +70331,16 @@ components:
x-enum-varnames:
- DROP_TAG
- DROP_EVENT
ObservabilityPipelineTagCardinalityLimitProcessorOverrideType:
description: How the override is applied. `limit_override` enforces a custom limit; `excluded` omits the metric or tag from cardinality tracking.
enum:
- limit_override
- excluded
example: limit_override
type: string
x-enum-varnames:
- LIMIT_OVERRIDE
- EXCLUDED
ObservabilityPipelineTagCardinalityLimitProcessorPerMetricLimit:
description: A cardinality override applied to a specific metric.
properties:
Expand All @@ -70337,65 +70350,63 @@ components:
description: The name of the metric this override applies to.
example: "system.cpu.user"
type: string
mode:
$ref: "#/components/schemas/ObservabilityPipelineTagCardinalityLimitProcessorPerMetricMode"
override_type:
$ref: "#/components/schemas/ObservabilityPipelineTagCardinalityLimitProcessorOverrideType"
per_tag_limits:
description: A list of per-tag cardinality overrides that apply within this metric. Must be omitted when `mode` is `excluded`.
description: A list of per-tag cardinality overrides that apply within this metric. Must be omitted when `override_type` is `excluded`.
items:
$ref: "#/components/schemas/ObservabilityPipelineTagCardinalityLimitProcessorPerTagLimit"
maxItems: 50
type: array
value_limit:
description: The maximum number of distinct tag value combinations allowed for this metric. Required when `mode` is `tracked`. Must be omitted when `mode` is `excluded`.
description: The maximum number of distinct tag value combinations allowed for this metric. Required when `override_type` is `limit_override`. Must be omitted when `override_type` is `excluded`.
example: 10000
format: int64
maximum: 1000000
minimum: 0
type: integer
required:
- metric_name
- mode
- override_type
type: object
ObservabilityPipelineTagCardinalityLimitProcessorPerMetricMode:
description: How the per-metric override is applied. `tracked` enforces a custom limit; `excluded` skips the metric entirely.
enum:
- tracked
- excluded
example: tracked
type: string
x-enum-varnames:
- TRACKED
- EXCLUDED
ObservabilityPipelineTagCardinalityLimitProcessorPerTagLimit:
description: A cardinality override for a specific tag key within a per-metric limit.
properties:
mode:
$ref: "#/components/schemas/ObservabilityPipelineTagCardinalityLimitProcessorPerTagMode"
override_type:
$ref: "#/components/schemas/ObservabilityPipelineTagCardinalityLimitProcessorOverrideType"
tag_key:
description: The tag key this override applies to.
example: "host"
type: string
value_limit:
description: The maximum number of distinct values allowed for this tag. Required when `mode` is `limit_override`. Must be omitted when `mode` is `excluded`.
description: The maximum number of distinct values allowed for this tag. Required when `override_type` is `limit_override`. Must be omitted when `override_type` is `excluded`.
example: 5000
format: int64
maximum: 1000000
minimum: 0
type: integer
required:
- tag_key
- override_type
type: object
ObservabilityPipelineTagCardinalityLimitProcessorTrackingMode:
description: Controls whether the processor uses exact or probabilistic tag tracking.
properties:
mode:
$ref: "#/components/schemas/ObservabilityPipelineTagCardinalityLimitProcessorTrackingModeMode"
required:
- mode
type: object
ObservabilityPipelineTagCardinalityLimitProcessorPerTagMode:
description: How the per-tag override is applied. `limit_override` enforces a custom limit on the tag; `excluded` skips the tag from cardinality tracking.
ObservabilityPipelineTagCardinalityLimitProcessorTrackingModeMode:
description: The cardinality tracking algorithm to use.
enum:
- limit_override
- excluded
example: limit_override
- exact_fingerprint
- probabilistic
example: exact_fingerprint
type: string
x-enum-varnames:
- LIMIT_OVERRIDE
- EXCLUDED
- EXACT_FINGERPRINT
- PROBABILISTIC
ObservabilityPipelineTagCardinalityLimitProcessorType:
default: tag_cardinality_limit
description: The processor type. The value must be `tag_cardinality_limit`.
Expand Down
5 changes: 3 additions & 2 deletions lib/datadog_api_client/inflector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5291,10 +5291,11 @@ def overrides
"v2.observability_pipeline_syslog_source_mode" => "ObservabilityPipelineSyslogSourceMode",
"v2.observability_pipeline_tag_cardinality_limit_processor" => "ObservabilityPipelineTagCardinalityLimitProcessor",
"v2.observability_pipeline_tag_cardinality_limit_processor_action" => "ObservabilityPipelineTagCardinalityLimitProcessorAction",
"v2.observability_pipeline_tag_cardinality_limit_processor_override_type" => "ObservabilityPipelineTagCardinalityLimitProcessorOverrideType",
"v2.observability_pipeline_tag_cardinality_limit_processor_per_metric_limit" => "ObservabilityPipelineTagCardinalityLimitProcessorPerMetricLimit",
"v2.observability_pipeline_tag_cardinality_limit_processor_per_metric_mode" => "ObservabilityPipelineTagCardinalityLimitProcessorPerMetricMode",
"v2.observability_pipeline_tag_cardinality_limit_processor_per_tag_limit" => "ObservabilityPipelineTagCardinalityLimitProcessorPerTagLimit",
"v2.observability_pipeline_tag_cardinality_limit_processor_per_tag_mode" => "ObservabilityPipelineTagCardinalityLimitProcessorPerTagMode",
"v2.observability_pipeline_tag_cardinality_limit_processor_tracking_mode" => "ObservabilityPipelineTagCardinalityLimitProcessorTrackingMode",
"v2.observability_pipeline_tag_cardinality_limit_processor_tracking_mode_mode" => "ObservabilityPipelineTagCardinalityLimitProcessorTrackingModeMode",
"v2.observability_pipeline_tag_cardinality_limit_processor_type" => "ObservabilityPipelineTagCardinalityLimitProcessorType",
"v2.observability_pipeline_throttle_processor" => "ObservabilityPipelineThrottleProcessor",
"v2.observability_pipeline_throttle_processor_type" => "ObservabilityPipelineThrottleProcessorType",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ class ObservabilityPipelineTagCardinalityLimitProcessor
# A list of per-metric cardinality overrides that take precedence over the default `value_limit`.
attr_reader :per_metric_limits

# Controls whether the processor uses exact or probabilistic tag tracking.
attr_reader :tracking_mode

# The processor type. The value must be `tag_cardinality_limit`.
attr_reader :type

Expand All @@ -59,6 +62,7 @@ def self.attribute_map
:'include' => :'include',
:'limit_exceeded_action' => :'limit_exceeded_action',
:'per_metric_limits' => :'per_metric_limits',
:'tracking_mode' => :'tracking_mode',
:'type' => :'type',
:'value_limit' => :'value_limit'
}
Expand All @@ -74,6 +78,7 @@ def self.openapi_types
:'include' => :'String',
:'limit_exceeded_action' => :'ObservabilityPipelineTagCardinalityLimitProcessorAction',
:'per_metric_limits' => :'Array<ObservabilityPipelineTagCardinalityLimitProcessorPerMetricLimit>',
:'tracking_mode' => :'ObservabilityPipelineTagCardinalityLimitProcessorTrackingMode',
:'type' => :'ObservabilityPipelineTagCardinalityLimitProcessorType',
:'value_limit' => :'Integer'
}
Expand Down Expand Up @@ -123,6 +128,10 @@ def initialize(attributes = {})
end
end

if attributes.key?(:'tracking_mode')
self.tracking_mode = attributes[:'tracking_mode']
end

if attributes.key?(:'type')
self.type = attributes[:'type']
end
Expand All @@ -141,6 +150,7 @@ def valid?
return false if @include.nil?
return false if @limit_exceeded_action.nil?
return false if !@per_metric_limits.nil? && @per_metric_limits.length > 100
return false if @tracking_mode.nil?
return false if @type.nil?
return false if @value_limit.nil?
return false if @value_limit > 1000000
Expand Down Expand Up @@ -198,6 +208,16 @@ def per_metric_limits=(per_metric_limits)
@per_metric_limits = per_metric_limits
end

# Custom attribute writer method with validation
# @param tracking_mode [Object] Object to be assigned
# @!visibility private
def tracking_mode=(tracking_mode)
if tracking_mode.nil?
fail ArgumentError, 'invalid value for "tracking_mode", tracking_mode cannot be nil.'
end
@tracking_mode = tracking_mode
end

# Custom attribute writer method with validation
# @param type [Object] Object to be assigned
# @!visibility private
Expand Down Expand Up @@ -256,6 +276,7 @@ def ==(o)
include == o.include &&
limit_exceeded_action == o.limit_exceeded_action &&
per_metric_limits == o.per_metric_limits &&
tracking_mode == o.tracking_mode &&
type == o.type &&
value_limit == o.value_limit &&
additional_properties == o.additional_properties
Expand All @@ -265,7 +286,7 @@ def ==(o)
# @return [Integer] Hash code
# @!visibility private
def hash
[display_name, enabled, id, include, limit_exceeded_action, per_metric_limits, type, value_limit, additional_properties].hash
[display_name, enabled, id, include, limit_exceeded_action, per_metric_limits, tracking_mode, type, value_limit, additional_properties].hash
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
require 'time'

module DatadogAPIClient::V2
# How the per-tag override is applied. `limit_override` enforces a custom limit on the tag; `excluded` skips the tag from cardinality tracking.
class ObservabilityPipelineTagCardinalityLimitProcessorPerTagMode
# How the override is applied. `limit_override` enforces a custom limit; `excluded` omits the metric or tag from cardinality tracking.
class ObservabilityPipelineTagCardinalityLimitProcessorOverrideType
include BaseEnumModel

LIMIT_OVERRIDE = "limit_override".freeze
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ class ObservabilityPipelineTagCardinalityLimitProcessorPerMetricLimit
# The name of the metric this override applies to.
attr_reader :metric_name

# How the per-metric override is applied. `tracked` enforces a custom limit; `excluded` skips the metric entirely.
attr_reader :mode
# How the override is applied. `limit_override` enforces a custom limit; `excluded` omits the metric or tag from cardinality tracking.
attr_reader :override_type

# A list of per-tag cardinality overrides that apply within this metric. Must be omitted when `mode` is `excluded`.
# A list of per-tag cardinality overrides that apply within this metric. Must be omitted when `override_type` is `excluded`.
attr_reader :per_tag_limits

# The maximum number of distinct tag value combinations allowed for this metric. Required when `mode` is `tracked`. Must be omitted when `mode` is `excluded`.
# The maximum number of distinct tag value combinations allowed for this metric. Required when `override_type` is `limit_override`. Must be omitted when `override_type` is `excluded`.
attr_reader :value_limit

attr_accessor :additional_properties
Expand All @@ -44,7 +44,7 @@ def self.attribute_map
{
:'limit_exceeded_action' => :'limit_exceeded_action',
:'metric_name' => :'metric_name',
:'mode' => :'mode',
:'override_type' => :'override_type',
:'per_tag_limits' => :'per_tag_limits',
:'value_limit' => :'value_limit'
}
Expand All @@ -56,7 +56,7 @@ def self.openapi_types
{
:'limit_exceeded_action' => :'ObservabilityPipelineTagCardinalityLimitProcessorAction',
:'metric_name' => :'String',
:'mode' => :'ObservabilityPipelineTagCardinalityLimitProcessorPerMetricMode',
:'override_type' => :'ObservabilityPipelineTagCardinalityLimitProcessorOverrideType',
:'per_tag_limits' => :'Array<ObservabilityPipelineTagCardinalityLimitProcessorPerTagLimit>',
:'value_limit' => :'Integer'
}
Expand Down Expand Up @@ -88,8 +88,8 @@ def initialize(attributes = {})
self.metric_name = attributes[:'metric_name']
end

if attributes.key?(:'mode')
self.mode = attributes[:'mode']
if attributes.key?(:'override_type')
self.override_type = attributes[:'override_type']
end

if attributes.key?(:'per_tag_limits')
Expand All @@ -108,7 +108,7 @@ def initialize(attributes = {})
# @!visibility private
def valid?
return false if @metric_name.nil?
return false if @mode.nil?
return false if @override_type.nil?
return false if !@per_tag_limits.nil? && @per_tag_limits.length > 50
return false if !@value_limit.nil? && @value_limit > 1000000
return false if !@value_limit.nil? && @value_limit < 0
Expand All @@ -126,13 +126,13 @@ def metric_name=(metric_name)
end

# Custom attribute writer method with validation
# @param mode [Object] Object to be assigned
# @param override_type [Object] Object to be assigned
# @!visibility private
def mode=(mode)
if mode.nil?
fail ArgumentError, 'invalid value for "mode", mode cannot be nil.'
def override_type=(override_type)
if override_type.nil?
fail ArgumentError, 'invalid value for "override_type", override_type cannot be nil.'
end
@mode = mode
@override_type = override_type
end

# Custom attribute writer method with validation
Expand Down Expand Up @@ -186,7 +186,7 @@ def ==(o)
self.class == o.class &&
limit_exceeded_action == o.limit_exceeded_action &&
metric_name == o.metric_name &&
mode == o.mode &&
override_type == o.override_type &&
per_tag_limits == o.per_tag_limits &&
value_limit == o.value_limit &&
additional_properties == o.additional_properties
Expand All @@ -196,7 +196,7 @@ def ==(o)
# @return [Integer] Hash code
# @!visibility private
def hash
[limit_exceeded_action, metric_name, mode, per_tag_limits, value_limit, additional_properties].hash
[limit_exceeded_action, metric_name, override_type, per_tag_limits, value_limit, additional_properties].hash
end
end
end
Loading
Loading