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
86 changes: 82 additions & 4 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58798,13 +58798,15 @@ components:
- token
type: object
Metric:
description: Object for a single metric tag configuration.
description: Object for a single metric.
example:
id: metric.foo.bar
type: metrics
properties:
id:
$ref: "#/components/schemas/MetricName"
relationships:
$ref: "#/components/schemas/MetricRelationships"
type:
$ref: "#/components/schemas/MetricType"
type: object
Expand Down Expand Up @@ -59341,12 +59343,12 @@ components:
description: Object containing the definition of a metric's ingested and indexed volume.
properties:
indexed_volume:
description: Indexed volume for the given metric.
description: Estimated average hourly number of indexed time series for the given metric over the last hour. For organizations on Metric Name Pricing, this represents the estimated sum of indexed data points over the last hour.
example: 10
format: int64
type: integer
ingested_volume:
description: Ingested volume for the given metric.
description: Estimated average hourly number of ingested time series for the given metric over the last hour. This value is 0 for metrics not configured with Metrics Without Limits. For organizations on Metric Name Pricing, this represents the estimated sum of ingested data points over the last hour.
example: 20
format: int64
type: integer
Expand Down Expand Up @@ -59523,6 +59525,12 @@ components:
format: double
type: number
type: object
MetricRelationships:
description: Relationships for a metric.
properties:
metric_volumes:
$ref: "#/components/schemas/MetricVolumesRelationship"
type: object
MetricResource:
description: Metric resource.
example: {name: "dummyhost", type: "host"}
Expand Down Expand Up @@ -59715,6 +59723,8 @@ components:
$ref: "#/components/schemas/MetricTagConfigurationAttributes"
id:
$ref: "#/components/schemas/MetricName"
relationships:
$ref: "#/components/schemas/MetricRelationships"
type:
$ref: "#/components/schemas/MetricTagConfigurationType"
type: object
Expand Down Expand Up @@ -59927,6 +59937,20 @@ components:
oneOf:
- $ref: "#/components/schemas/MetricDistinctVolume"
- $ref: "#/components/schemas/MetricIngestedIndexedVolume"
MetricVolumesRelationship:
description: Relationship to a metric volume included in the response.
properties:
data:
$ref: "#/components/schemas/MetricVolumesRelationshipData"
type: object
MetricVolumesRelationshipData:
description: Relationship data for a metric volume.
properties:
id:
$ref: "#/components/schemas/MetricName"
type:
$ref: "#/components/schemas/MetricIngestedIndexedVolumeType"
type: object
MetricVolumesResponse:
description: Response object which includes a single metric's volume.
properties:
Expand Down Expand Up @@ -59972,6 +59996,11 @@ components:
items:
$ref: "#/components/schemas/MetricsAndMetricTagConfigurations"
type: array
included:
description: Array of metric volume resources included when requested with `include=metric_volumes`.
items:
$ref: "#/components/schemas/MetricIngestedIndexedVolume"
type: array
links:
$ref: "#/components/schemas/MetricsListResponseLinks"
meta:
Expand Down Expand Up @@ -152116,13 +152145,20 @@ paths:
Query parameters use bracket notation (for example, `filter[tags]`, `filter[queried][window][seconds]`). Pass them as standard URL query strings, URL-encoding the brackets if your client does not handle them. For example: `GET /api/v2/metrics?filter[tags]=env:prod&window[seconds]=86400&page[size]=500`.
operationId: ListTagConfigurations
parameters:
- description: Only return custom metrics that have been configured with Metrics Without Limits.
- description: Only return custom metrics that have been configured (`true`) or not configured (`false`) with Metrics Without Limits.
example: true
in: query
name: filter[configured]
required: false
schema:
type: boolean
- description: Only return metrics that are eligible (`true`) or ineligible (`false`) for configuration with Metrics Without Limits.
example: true
in: query
name: filter[is_configurable]
required: false
schema:
type: boolean
- description: Only return metrics that have the given tag key(s) in their Metrics Without Limits configuration (included or excluded).
example: "app,env"
in: query
Expand Down Expand Up @@ -152180,6 +152216,20 @@ paths:
required: false
schema:
type: boolean
- description: Include related resources in the response. Set to `metric_volumes` to include indexed and ingested volume counts for each metric.
example: metric_volumes
in: query
name: include
required: false
schema:
type: string
- description: "Sort results by metric volume. Prefix a key with `-` for descending order. Supported keys: `metric_volumes.indexed_volume`, `metric_volumes.ingested_volume`, `metric_volumes.indexed_volume_delta`, `metric_volumes.ingested_volume_delta`. Requires a paginated request (`page[size]` or `page[cursor]`)."
example: "-metric_volumes.indexed_volume"
in: query
name: sort
required: false
schema:
type: string
- description: |-
Only return metrics that have been actively reporting in the specified window. The default value is 3600 seconds (1 hour), the maximum value is 2,592,000 seconds (30 days), and the minimum value is 1 second.
example: 3600
Expand Down Expand Up @@ -152221,6 +152271,34 @@ paths:
meta:
pagination:
next_cursor:
with_metric_volumes:
value:
data:
- id: user.custom.cpu.usage
relationships:
metric_volumes:
data:
id: user.custom.cpu.usage
type: metric_volumes
type: metrics
- id: user.custom.mem.usage
relationships:
metric_volumes:
data:
id: user.custom.mem.usage
type: metric_volumes
type: metrics
included:
- attributes:
indexed_volume: 1000
ingested_volume: 456
id: user.custom.cpu.usage
type: metric_volumes
- attributes:
indexed_volume: 250
ingested_volume: 1011
id: user.custom.mem.usage
type: metric_volumes
schema:
$ref: "#/components/schemas/MetricsAndMetricTagConfigurationsResponse"
description: Success
Expand Down
3 changes: 3 additions & 0 deletions features/scenarios_model_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4099,13 +4099,16 @@
},
"v2.ListTagConfigurations" => {
"filter_configured" => "Boolean",
"filter_is_configurable" => "Boolean",
"filter_tags_configured" => "String",
"filter_metric_type" => "MetricTagConfigurationMetricTypeCategory",
"filter_include_percentiles" => "Boolean",
"filter_queried" => "Boolean",
"filter_queried_window_seconds" => "Integer",
"filter_tags" => "String",
"filter_related_assets" => "Boolean",
"include" => "String",
"sort" => "String",
"window_seconds" => "Integer",
"page_size" => "Integer",
"page_cursor" => "String",
Expand Down
3 changes: 3 additions & 0 deletions lib/datadog_api_client/inflector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4632,6 +4632,7 @@ def overrides
"v2.metric_pagination_meta" => "MetricPaginationMeta",
"v2.metric_payload" => "MetricPayload",
"v2.metric_point" => "MetricPoint",
"v2.metric_relationships" => "MetricRelationships",
"v2.metric_resource" => "MetricResource",
"v2.metrics_aggregator" => "MetricsAggregator",
"v2.metrics_and_metric_tag_configurations" => "MetricsAndMetricTagConfigurations",
Expand Down Expand Up @@ -4664,6 +4665,8 @@ def overrides
"v2.metric_tag_configuration_update_request" => "MetricTagConfigurationUpdateRequest",
"v2.metric_type" => "MetricType",
"v2.metric_volumes" => "MetricVolumes",
"v2.metric_volumes_relationship" => "MetricVolumesRelationship",
"v2.metric_volumes_relationship_data" => "MetricVolumesRelationshipData",
"v2.metric_volumes_response" => "MetricVolumesResponse",
"v2.microsoft_sentinel_destination" => "MicrosoftSentinelDestination",
"v2.microsoft_sentinel_destination_type" => "MicrosoftSentinelDestinationType",
Expand Down
8 changes: 7 additions & 1 deletion lib/datadog_api_client/v2/api/metrics_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1092,14 +1092,17 @@ def list_tag_configurations(opts = {})
# Query parameters use bracket notation (for example, `filter[tags]`, `filter[queried][window][seconds]`). Pass them as standard URL query strings, URL-encoding the brackets if your client does not handle them. For example: `GET /api/v2/metrics?filter[tags]=env:prod&window[seconds]=86400&page[size]=500`.
#
# @param opts [Hash] the optional parameters
# @option opts [Boolean] :filter_configured Only return custom metrics that have been configured with Metrics Without Limits.
# @option opts [Boolean] :filter_configured Only return custom metrics that have been configured (`true`) or not configured (`false`) with Metrics Without Limits.
# @option opts [Boolean] :filter_is_configurable Only return metrics that are eligible (`true`) or ineligible (`false`) for configuration with Metrics Without Limits.
# @option opts [String] :filter_tags_configured Only return metrics that have the given tag key(s) in their Metrics Without Limits configuration (included or excluded).
# @option opts [MetricTagConfigurationMetricTypeCategory] :filter_metric_type Only return metrics of the given metric type.
# @option opts [Boolean] :filter_include_percentiles Only return distribution metrics that have percentile aggregations enabled (true) or disabled (false).
# @option opts [Boolean] :filter_queried Only return metrics that have been queried (true) or not queried (false) in the look back window. Set the window with `filter[queried][window][seconds]`; if omitted, a default window is used.
# @option opts [Integer] :filter_queried_window_seconds This parameter has no effect unless `filter[queried]` is also set. Only return metrics that have been queried or not queried in the specified window. The default value is 2,592,000 seconds (30 days), the maximum value is 15,552,000 seconds (180 days), and the minimum value is 1 second. For example: `filter[queried]=true&filter[queried][window][seconds]=604800`.
# @option opts [String] :filter_tags Only return metrics that were submitted with tags matching this expression. You can use AND, OR, IN, and wildcards. For example: `filter[tags]=env IN (staging,test) AND service:web*`.
# @option opts [Boolean] :filter_related_assets Only return metrics that are used in at least one dashboard, monitor, notebook, or SLO.
# @option opts [String] :include Include related resources in the response. Set to `metric_volumes` to include indexed and ingested volume counts for each metric.
# @option opts [String] :sort Sort results by metric volume. Prefix a key with `-` for descending order. Supported keys: `metric_volumes.indexed_volume`, `metric_volumes.ingested_volume`, `metric_volumes.indexed_volume_delta`, `metric_volumes.ingested_volume_delta`. Requires a paginated request (`page[size]` or `page[cursor]`).
# @option opts [Integer] :window_seconds Only return metrics that have been actively reporting in the specified window. The default value is 3600 seconds (1 hour), the maximum value is 2,592,000 seconds (30 days), and the minimum value is 1 second.
# @option opts [Integer] :page_size Maximum number of results per page. Send `page[size]` on the first request to opt in to pagination. On each subsequent request, send `page[cursor]` set to the value of `meta.pagination.next_cursor` from the previous response. The default value is 10000, the maximum value is 10000, and the minimum value is 1.
# @option opts [String] :page_cursor Cursor for pagination. Use `page[size]` to opt-in to pagination and get the first page; for subsequent pages, use the value from `meta.pagination.next_cursor` in the response. Pagination is complete when `next_cursor` is null.
Expand Down Expand Up @@ -1137,13 +1140,16 @@ def list_tag_configurations_with_http_info(opts = {})
# query parameters
query_params = opts[:query_params] || {}
query_params[:'filter[configured]'] = opts[:'filter_configured'] if !opts[:'filter_configured'].nil?
query_params[:'filter[is_configurable]'] = opts[:'filter_is_configurable'] if !opts[:'filter_is_configurable'].nil?
query_params[:'filter[tags_configured]'] = opts[:'filter_tags_configured'] if !opts[:'filter_tags_configured'].nil?
query_params[:'filter[metric_type]'] = opts[:'filter_metric_type'] if !opts[:'filter_metric_type'].nil?
query_params[:'filter[include_percentiles]'] = opts[:'filter_include_percentiles'] if !opts[:'filter_include_percentiles'].nil?
query_params[:'filter[queried]'] = opts[:'filter_queried'] if !opts[:'filter_queried'].nil?
query_params[:'filter[queried][window][seconds]'] = opts[:'filter_queried_window_seconds'] if !opts[:'filter_queried_window_seconds'].nil?
query_params[:'filter[tags]'] = opts[:'filter_tags'] if !opts[:'filter_tags'].nil?
query_params[:'filter[related_assets]'] = opts[:'filter_related_assets'] if !opts[:'filter_related_assets'].nil?
query_params[:'include'] = opts[:'include'] if !opts[:'include'].nil?
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
query_params[:'window[seconds]'] = opts[:'window_seconds'] if !opts[:'window_seconds'].nil?
query_params[:'page[size]'] = opts[:'page_size'] if !opts[:'page_size'].nil?
query_params[:'page[cursor]'] = opts[:'page_cursor'] if !opts[:'page_cursor'].nil?
Expand Down
14 changes: 12 additions & 2 deletions lib/datadog_api_client/v2/models/metric.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,16 @@
require 'time'

module DatadogAPIClient::V2
# Object for a single metric tag configuration.
# Object for a single metric.
class Metric
include BaseGenericModel

# The metric name for this resource.
attr_accessor :id

# Relationships for a metric.
attr_accessor :relationships

# The metric resource type.
attr_accessor :type

Expand All @@ -34,6 +37,7 @@ class Metric
def self.attribute_map
{
:'id' => :'id',
:'relationships' => :'relationships',
:'type' => :'type'
}
end
Expand All @@ -43,6 +47,7 @@ def self.attribute_map
def self.openapi_types
{
:'id' => :'String',
:'relationships' => :'MetricRelationships',
:'type' => :'MetricType'
}
end
Expand All @@ -69,6 +74,10 @@ def initialize(attributes = {})
self.id = attributes[:'id']
end

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

if attributes.key?(:'type')
self.type = attributes[:'type']
end
Expand Down Expand Up @@ -101,6 +110,7 @@ def ==(o)
return true if self.equal?(o)
self.class == o.class &&
id == o.id &&
relationships == o.relationships &&
type == o.type &&
additional_properties == o.additional_properties
end
Expand All @@ -109,7 +119,7 @@ def ==(o)
# @return [Integer] Hash code
# @!visibility private
def hash
[id, type, additional_properties].hash
[id, relationships, type, additional_properties].hash
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ module DatadogAPIClient::V2
class MetricIngestedIndexedVolumeAttributes
include BaseGenericModel

# Indexed volume for the given metric.
# Estimated average hourly number of indexed time series for the given metric over the last hour. For organizations on Metric Name Pricing, this represents the estimated sum of indexed data points over the last hour.
attr_accessor :indexed_volume

# Ingested volume for the given metric.
# Estimated average hourly number of ingested time series for the given metric over the last hour. This value is 0 for metrics not configured with Metrics Without Limits. For organizations on Metric Name Pricing, this represents the estimated sum of ingested data points over the last hour.
attr_accessor :ingested_volume

attr_accessor :additional_properties
Expand Down
Loading
Loading