Metrics Summary ページまたは Metrics without Limits™ で構成可能なすべてのメトリクスを返します (追加のフィルターが指定されている場合はそれにも一致します)。
オプションとして、page[cursor] および/または page[size] クエリパラメーターを使用してページネーションすることができます。
最初のページを取得するには、有効な page[size] を指定するか、page[cursor] に空の値 (例: page[cursor]=) を渡してください。次のページを取得するには、レスポンスから返される next_cursor の値を新しい page[cursor] の値として渡します。
meta.pagination.next_cursor が null の場合、すべてのページを取得し終えたことを示します。
This endpoint requires the metrics_read permission.
OAuth apps require the metrics_read authorization scope to access this endpoint.
引数
クエリ文字列
名前
種類
説明
filter[configured]
boolean
Only return custom metrics that have been configured (true) or not configured (false) with Metrics Without Limits.
filter[is_configurable]
boolean
Only return metrics that are eligible (true) or ineligible (false) for configuration with Metrics Without Limits.
filter[tags_configured]
string
Only return metrics that have the given tag key(s) in their Metrics Without Limits configuration (included or excluded).
filter[metric_type]
enum
Only return metrics of the given metric type. Allowed enum values: non_distribution, distribution
filter[include_percentiles]
boolean
Only return distribution metrics that have percentile aggregations enabled (true) or disabled (false).
filter[queried]
boolean
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.
filter[queried][window][seconds]
integer
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.
filter[tags]
string
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*.
filter[related_assets]
boolean
Only return metrics that are used in at least one dashboard, monitor, notebook, or SLO.
include
string
Include related resources in the response. Set to metric_volumes to include indexed and ingested volume counts for each metric.
sort
string
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]).
window[seconds]
integer
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.
page[size]
integer
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.
page[cursor]
string
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.
Response object that includes metrics and metric tag configurations.
Expand All
フィールド
種類
説明
data
[ <oneOf>]
Array of metrics and metric tag configurations.
Option 1
object
Object for a single metric.
id
string
The metric name for this resource.
relationships
object
Relationships for a metric.
metric_volumes
object
Relationship to a metric volume included in the response.
data
object
Relationship data for a metric volume.
id
string
The metric name for this resource.
type
enum
The metric ingested and indexed volume type.
Allowed enum values: metric_volumes
default: metric_volumes
type
enum
The metric resource type.
Allowed enum values: metrics
default: metrics
Option 2
object
Object for a single metric tag configuration.
attributes
object
Object containing the definition of a metric tag configuration attributes.
aggregations
[object]
Deprecated. You no longer need to configure specific time and space aggregations for Metrics Without Limits.
space [required]
enum
A space aggregation for use in query.
Allowed enum values: avg,max,min,sum
time [required]
enum
A time aggregation for use in query.
Allowed enum values: avg,count,max,min,sum
created_at
date-time
Timestamp when the tag configuration was created.
exclude_tags_mode
boolean
When set to true, the configuration will exclude the configured tags and include any other submitted tags.
When set to false, the configuration will include the configured tags and exclude any other submitted tags.
Defaults to false. Requires tags property.
include_percentiles
boolean
Toggle to include or exclude percentile aggregations for distribution metrics.
Only present when the metric_type is distribution.
metric_type
enum
The metric's type.
Allowed enum values: gauge,count,rate,distribution
default: gauge
modified_at
date-time
Timestamp when the tag configuration was last modified.
tags
[string]
List of tag keys on which to group.
id
string
The metric name for this resource.
relationships
object
Relationships for a metric.
metric_volumes
object
Relationship to a metric volume included in the response.
data
object
Relationship data for a metric volume.
id
string
The metric name for this resource.
type
enum
The metric ingested and indexed volume type.
Allowed enum values: metric_volumes
default: metric_volumes
type
enum
The metric tag configuration resource type.
Allowed enum values: manage_tags
default: manage_tags
included
[object]
Array of metric volume resources included when requested with include=metric_volumes.
attributes
object
Object containing the definition of a metric's ingested and indexed volume.
indexed_volume
int64
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.
ingested_volume
int64
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.
id
string
The metric name for this resource.
type
enum
The metric ingested and indexed volume type.
Allowed enum values: metric_volumes
default: metric_volumes
links
object
Pagination links. Only present if pagination query parameters were provided.
first
string
Link to the first page.
last
string
Link to the last page.
next
string
Link to the next page.
prev
string
Link to previous page.
self
string
Link to current page.
meta
object
Response metadata object.
pagination
object
Paging attributes. Only present if pagination query parameters were provided.
cursor
string
The cursor used to get the current results, if any.
limit
int32
Number of results returned
next_cursor
string
The cursor used to get the next results, if any.
type
enum
Type of metric pagination.
Allowed enum values: cursor_limit
"""
Get a list of metrics returns "Success" response
"""fromdatadog_api_clientimportApiClient,Configurationfromdatadog_api_client.v2.api.metrics_apiimportMetricsApiconfiguration=Configuration()withApiClient(configuration)asapi_client:api_instance=MetricsApi(api_client)response=api_instance.list_tag_configurations()print(response)
# Get a list of metrics returns "Success" responserequire"datadog_api_client"api_instance=DatadogAPIClient::V2::MetricsAPI.newpapi_instance.list_tag_configurations()
// Get a list of metrics returns "Success" responsepackagemainimport("context""encoding/json""fmt""os""github.com/DataDog/datadog-api-client-go/v2/api/datadog""github.com/DataDog/datadog-api-client-go/v2/api/datadogV2")funcmain(){ctx:=datadog.NewDefaultContext(context.Background())configuration:=datadog.NewConfiguration()apiClient:=datadog.NewAPIClient(configuration)api:=datadogV2.NewMetricsApi(apiClient)resp,r,err:=api.ListTagConfigurations(ctx,*datadogV2.NewListTagConfigurationsOptionalParameters())iferr!=nil{fmt.Fprintf(os.Stderr,"Error when calling `MetricsApi.ListTagConfigurations`: %v\n",err)fmt.Fprintf(os.Stderr,"Full HTTP response: %v\n",r)}responseContent,_:=json.MarshalIndent(resp,""," ")fmt.Fprintf(os.Stdout,"Response from `MetricsApi.ListTagConfigurations`:\n%s\n",responseContent)}
// Get a list of metrics returns "Success" responseimportcom.datadog.api.client.ApiClient;importcom.datadog.api.client.ApiException;importcom.datadog.api.client.v2.api.MetricsApi;importcom.datadog.api.client.v2.model.MetricsAndMetricTagConfigurationsResponse;publicclassExample{publicstaticvoidmain(String[]args){ApiClientdefaultClient=ApiClient.getDefaultApiClient();MetricsApiapiInstance=newMetricsApi(defaultClient);try{MetricsAndMetricTagConfigurationsResponseresult=apiInstance.listTagConfigurations();System.out.println(result);}catch(ApiExceptione){System.err.println("Exception when calling MetricsApi#listTagConfigurations");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace();}}}
// Get a list of metrics returns "Success" response
usedatadog_api_client::datadog;usedatadog_api_client::datadogV2::api_metrics::ListTagConfigurationsOptionalParams;usedatadog_api_client::datadogV2::api_metrics::MetricsAPI;#[tokio::main]asyncfnmain(){letconfiguration=datadog::Configuration::new();letapi=MetricsAPI::with_config(configuration);letresp=api.list_tag_configurations(ListTagConfigurationsOptionalParams::default()).await;ifletOk(value)=resp{println!("{:#?}",value);}else{println!("{:#?}",resp.unwrap_err());}}
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comap2.datadoghq.comuk1.datadoghq.comddog-gov.comus2.ddog-gov.com"DD_API_KEY="<DD_API_KEY>"DD_APP_KEY="<DD_APP_KEY>"cargo run
/**
* Get a list of metrics returns "Success" response
*/import{client,v2}from"@datadog/datadog-api-client";constconfiguration=client.createConfiguration();constapiInstance=newv2.MetricsApi(configuration);apiInstance.listTagConfigurations().then((data: v2.MetricsAndMetricTagConfigurationsResponse)=>{console.log("API called successfully. Returned data: "+JSON.stringify(data));}).catch((error: any)=>console.error(error));