Skip to content
Merged
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 @@ -152443,13 +152472,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 @@ -152507,6 +152543,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 @@ -152548,6 +152598,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
61 changes: 59 additions & 2 deletions src/main/java/com/datadog/api/client/v2/api/MetricsApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -2490,29 +2490,45 @@ public ApiResponse<MetricTagConfigurationResponse> listTagConfigurationByNameWit
/** Manage optional parameters to listTagConfigurations. */
public static class ListTagConfigurationsOptionalParameters {
private Boolean filterConfigured;
private Boolean filterIsConfigurable;
private String filterTagsConfigured;
private MetricTagConfigurationMetricTypeCategory filterMetricType;
private Boolean filterIncludePercentiles;
private Boolean filterQueried;
private Long filterQueriedWindowSeconds;
private String filterTags;
private Boolean filterRelatedAssets;
private String include;
private String sort;
private Long windowSeconds;
private Integer pageSize;
private String pageCursor;

/**
* Set filterConfigured.
*
* @param filterConfigured Only return custom metrics that have been configured with Metrics
* Without Limits. (optional)
* @param filterConfigured Only return custom metrics that have been configured (<code>true
* </code>) or not configured (<code>false</code>) with Metrics Without Limits. (optional)
* @return ListTagConfigurationsOptionalParameters
*/
public ListTagConfigurationsOptionalParameters filterConfigured(Boolean filterConfigured) {
this.filterConfigured = filterConfigured;
return this;
}

/**
* Set filterIsConfigurable.
*
* @param filterIsConfigurable Only return metrics that are eligible (<code>true</code>) or
* ineligible (<code>false</code>) for configuration with Metrics Without Limits. (optional)
* @return ListTagConfigurationsOptionalParameters
*/
public ListTagConfigurationsOptionalParameters filterIsConfigurable(
Boolean filterIsConfigurable) {
this.filterIsConfigurable = filterIsConfigurable;
return this;
}

/**
* Set filterTagsConfigured.
*
Expand Down Expand Up @@ -2608,6 +2624,33 @@ public ListTagConfigurationsOptionalParameters filterRelatedAssets(
return this;
}

/**
* Set include.
*
* @param include Include related resources in the response. Set to <code>metric_volumes</code>
* to include indexed and ingested volume counts for each metric. (optional)
* @return ListTagConfigurationsOptionalParameters
*/
public ListTagConfigurationsOptionalParameters include(String include) {
this.include = include;
return this;
}

/**
* Set sort.
*
* @param sort Sort results by metric volume. Prefix a key with <code>-</code> for descending
* order. Supported keys: <code>metric_volumes.indexed_volume</code>, <code>
* metric_volumes.ingested_volume</code>, <code>metric_volumes.indexed_volume_delta</code>,
* <code>metric_volumes.ingested_volume_delta</code>. Requires a paginated request (<code>
* page[size]</code> or <code>page[cursor]</code>). (optional)
* @return ListTagConfigurationsOptionalParameters
*/
public ListTagConfigurationsOptionalParameters sort(String sort) {
this.sort = sort;
return this;
}

/**
* Set windowSeconds.
*
Expand Down Expand Up @@ -2792,13 +2835,16 @@ public ApiResponse<MetricsAndMetricTagConfigurationsResponse> listTagConfigurati
ListTagConfigurationsOptionalParameters parameters) throws ApiException {
Object localVarPostBody = null;
Boolean filterConfigured = parameters.filterConfigured;
Boolean filterIsConfigurable = parameters.filterIsConfigurable;
String filterTagsConfigured = parameters.filterTagsConfigured;
MetricTagConfigurationMetricTypeCategory filterMetricType = parameters.filterMetricType;
Boolean filterIncludePercentiles = parameters.filterIncludePercentiles;
Boolean filterQueried = parameters.filterQueried;
Long filterQueriedWindowSeconds = parameters.filterQueriedWindowSeconds;
String filterTags = parameters.filterTags;
Boolean filterRelatedAssets = parameters.filterRelatedAssets;
String include = parameters.include;
String sort = parameters.sort;
Long windowSeconds = parameters.windowSeconds;
Integer pageSize = parameters.pageSize;
String pageCursor = parameters.pageCursor;
Expand All @@ -2810,6 +2856,8 @@ public ApiResponse<MetricsAndMetricTagConfigurationsResponse> listTagConfigurati

localVarQueryParams.addAll(
apiClient.parameterToPairs("", "filter[configured]", filterConfigured));
localVarQueryParams.addAll(
apiClient.parameterToPairs("", "filter[is_configurable]", filterIsConfigurable));
localVarQueryParams.addAll(
apiClient.parameterToPairs("", "filter[tags_configured]", filterTagsConfigured));
localVarQueryParams.addAll(
Expand All @@ -2823,6 +2871,8 @@ public ApiResponse<MetricsAndMetricTagConfigurationsResponse> listTagConfigurati
localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[tags]", filterTags));
localVarQueryParams.addAll(
apiClient.parameterToPairs("", "filter[related_assets]", filterRelatedAssets));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "window[seconds]", windowSeconds));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor));
Expand Down Expand Up @@ -2859,13 +2909,16 @@ public ApiResponse<MetricsAndMetricTagConfigurationsResponse> listTagConfigurati
listTagConfigurationsWithHttpInfoAsync(ListTagConfigurationsOptionalParameters parameters) {
Object localVarPostBody = null;
Boolean filterConfigured = parameters.filterConfigured;
Boolean filterIsConfigurable = parameters.filterIsConfigurable;
String filterTagsConfigured = parameters.filterTagsConfigured;
MetricTagConfigurationMetricTypeCategory filterMetricType = parameters.filterMetricType;
Boolean filterIncludePercentiles = parameters.filterIncludePercentiles;
Boolean filterQueried = parameters.filterQueried;
Long filterQueriedWindowSeconds = parameters.filterQueriedWindowSeconds;
String filterTags = parameters.filterTags;
Boolean filterRelatedAssets = parameters.filterRelatedAssets;
String include = parameters.include;
String sort = parameters.sort;
Long windowSeconds = parameters.windowSeconds;
Integer pageSize = parameters.pageSize;
String pageCursor = parameters.pageCursor;
Expand All @@ -2877,6 +2930,8 @@ public ApiResponse<MetricsAndMetricTagConfigurationsResponse> listTagConfigurati

localVarQueryParams.addAll(
apiClient.parameterToPairs("", "filter[configured]", filterConfigured));
localVarQueryParams.addAll(
apiClient.parameterToPairs("", "filter[is_configurable]", filterIsConfigurable));
localVarQueryParams.addAll(
apiClient.parameterToPairs("", "filter[tags_configured]", filterTagsConfigured));
localVarQueryParams.addAll(
Expand All @@ -2890,6 +2945,8 @@ public ApiResponse<MetricsAndMetricTagConfigurationsResponse> listTagConfigurati
localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[tags]", filterTags));
localVarQueryParams.addAll(
apiClient.parameterToPairs("", "filter[related_assets]", filterRelatedAssets));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "include", include));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "window[seconds]", windowSeconds));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[cursor]", pageCursor));
Expand Down
37 changes: 34 additions & 3 deletions src/main/java/com/datadog/api/client/v2/model/Metric.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,22 @@
import java.util.Map;
import java.util.Objects;

/** Object for a single metric tag configuration. */
@JsonPropertyOrder({Metric.JSON_PROPERTY_ID, Metric.JSON_PROPERTY_TYPE})
/** Object for a single metric. */
@JsonPropertyOrder({
Metric.JSON_PROPERTY_ID,
Metric.JSON_PROPERTY_RELATIONSHIPS,
Metric.JSON_PROPERTY_TYPE
})
@jakarta.annotation.Generated(
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
public class Metric {
@JsonIgnore public boolean unparsed = false;
public static final String JSON_PROPERTY_ID = "id";
private String id;

public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships";
private MetricRelationships relationships;

public static final String JSON_PROPERTY_TYPE = "type";
private MetricType type = MetricType.METRICS;

Expand All @@ -49,6 +56,28 @@ public void setId(String id) {
this.id = id;
}

public Metric relationships(MetricRelationships relationships) {
this.relationships = relationships;
this.unparsed |= relationships.unparsed;
return this;
}

/**
* Relationships for a metric.
*
* @return relationships
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_RELATIONSHIPS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public MetricRelationships getRelationships() {
return relationships;
}

public void setRelationships(MetricRelationships relationships) {
this.relationships = relationships;
}

public Metric type(MetricType type) {
this.type = type;
this.unparsed |= !type.isValid();
Expand Down Expand Up @@ -131,20 +160,22 @@ public boolean equals(Object o) {
}
Metric metric = (Metric) o;
return Objects.equals(this.id, metric.id)
&& Objects.equals(this.relationships, metric.relationships)
&& Objects.equals(this.type, metric.type)
&& Objects.equals(this.additionalProperties, metric.additionalProperties);
}

@Override
public int hashCode() {
return Objects.hash(id, type, additionalProperties);
return Objects.hash(id, relationships, type, additionalProperties);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Metric {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" additionalProperties: ")
.append(toIndentedString(additionalProperties))
Expand Down
Loading
Loading