Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ListActiveConfigurations endpoint and add new filter[queried] param to list tag configurations endpoint #1619

Merged
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
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.4",
"regenerated": "2022-09-01 20:59:40.987816",
"spec_repo_commit": "db2c39ca"
"regenerated": "2022-09-02 12:49:59.970530",
"spec_repo_commit": "3aa1b866"
},
"v2": {
"apigentools_version": "1.6.4",
"regenerated": "2022-09-01 20:59:40.999884",
"spec_repo_commit": "db2c39ca"
"regenerated": "2022-09-02 12:49:59.987829",
"spec_repo_commit": "3aa1b866"
}
}
}
136 changes: 127 additions & 9 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4156,6 +4156,15 @@ components:
type:
$ref: '#/components/schemas/MetricType'
type: object
MetricActiveConfigurationType:
default: actively_queried_configurations
description: The metric actively queried configuration resource type.
enum:
- actively_queried_configurations
example: actively_queried_configurations
type: string
x-enum-varnames:
- ACTIVELY_QUERIED_CONFIGURATIONS
MetricAllTags:
description: Object for a single metric's indexed tags.
properties:
Expand Down Expand Up @@ -4681,6 +4690,50 @@ components:
- metric
- points
type: object
MetricSuggestedAggregations:
description: List of aggregation combinations that have been actively queried.
example:
- space: sum
time: sum
- space: sum
time: count
items:
$ref: '#/components/schemas/MetricCustomAggregation'
type: array
MetricSuggestedTagsAndAggregations:
description: Object for a single metric's actively queried tags and aggregations.
properties:
attributes:
$ref: '#/components/schemas/MetricSuggestedTagsAttributes'
id:
$ref: '#/components/schemas/MetricName'
type:
$ref: '#/components/schemas/MetricActiveConfigurationType'
type: object
MetricSuggestedTagsAndAggregationsResponse:
description: Response object that includes a single metric's actively queried
tags and aggregations.
properties:
data:
$ref: '#/components/schemas/MetricSuggestedTagsAndAggregations'
readOnly: true
type: object
MetricSuggestedTagsAttributes:
description: Object containing the definition of a metric's actively queried
tags and aggregations.
properties:
active_aggregations:
$ref: '#/components/schemas/MetricSuggestedAggregations'
active_tags:
description: List of tag keys that have been actively queried.
example:
- app
- datacenter
items:
description: Actively queried tag keys.
type: string
type: array
type: object
MetricTagConfiguration:
description: Object for a single metric tag configuration.
example:
Expand Down Expand Up @@ -10615,12 +10668,10 @@ paths:
resultsPath: data
/api/v2/metrics:
get:
description: 'Returns all configured count/gauge/rate/distribution metric names

(with additional filters if specified).'
description: Returns all metrics (matching additional filters if specified).
operationId: ListTagConfigurations
parameters:
- description: Filter metrics that have configured tags.
- description: Filter custom metrics that have configured tags.
example: true
in: query
name: filter[configured]
Expand All @@ -10635,7 +10686,7 @@ paths:
schema:
description: Tag keys to filter by.
type: string
- description: Filter tag configurations by metric type.
- description: Filter metrics by metric type.
in: query
name: filter[metric_type]
required: false
Expand All @@ -10650,20 +10701,31 @@ paths:
required: false
schema:
type: boolean
- description: 'Filter custom metrics that have or have not been queried in
the specified window[seconds].

If no window is provided or the window is less than 2 hours, a default of
2 hours will be applied.'
example: true
in: query
name: filter[queried]
required: false
schema:
type: boolean
- description: 'Filter metrics that have been submitted with the given tags.
Supports boolean and wildcard expressions.

Cannot be combined with other filters.'
Can only be combined with the filter[queried] filter.'
example: env IN (staging,test) AND service:web
in: query
name: filter[tags]
required: false
schema:
type: string
- description: 'The number of seconds of look back (from now) to apply to a
filter[tag] query.
filter[tag] or filter[queried] query.

Defaults value is 3600 (1 hour), maximum value is 172,800 (2 days).'
Defaults value is 3600 (1 hour), maximum value is 1,209,600 (2 weeks).'
example: 3600
in: query
name: window[seconds]
Expand Down Expand Up @@ -10701,7 +10763,7 @@ paths:
appKeyAuth: []
- AuthZ:
- metrics_read
summary: List tag configurations
summary: Get a list of metrics
tags:
- Metrics
/api/v2/metrics/config/bulk-tags:
Expand Down Expand Up @@ -10817,6 +10879,62 @@ paths:
tags:
- Metrics
x-codegen-request-body-name: body
/api/v2/metrics/{metric_name}/active-configurations:
get:
description: List tags and aggregations that are actively queried on dashboards
and monitors for a given metric name.
operationId: ListActiveMetricConfigurations
parameters:
- $ref: '#/components/parameters/MetricName'
- description: 'The number of seconds of look back (from now).

Default value is 604,800 (1 week), minimum value is 7200 (2 hours), maximum
value is 2,630,000 (1 month).'
example: 7200
in: query
name: window[seconds]
required: false
schema:
format: int64
type: integer
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/MetricSuggestedTagsAndAggregationsResponse'
description: Success
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
description: Bad Request
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
description: Forbidden
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
description: Not Found
'429':
content:
application/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
description: Too Many Requests
security:
- apiKeyAuth: []
appKeyAuth: []
- AuthZ: []
summary: List active tags and aggregations
tags:
- Metrics
/api/v2/metrics/{metric_name}/all-tags:
get:
description: View indexed tag key-value pairs for a given metric name.
Expand Down
Loading