Skip to main content

tags

Creates, updates, deletes, gets or lists a tags resource.

Overview

Nametags
TypeResource
Iddatadog.metrics.tags

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe metric name for this resource. (example: test.metric.latency)
attributesobjectObject containing the definition of a metric's tags.
typestringThe metric resource type. (default: metrics, example: metrics)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_tags_by_metric_nameselectmetric_name, regionView indexed tag key-value pairs for a given metric name over the previous hour.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
metric_namestringThe name of the metric. (example: dist.http.endpoint.request)
regionstring(default: datadoghq.com)

SELECT examples

View indexed tag key-value pairs for a given metric name over the previous hour.

SELECT
id,
attributes,
type
FROM datadog.metrics.tags
WHERE metric_name = '{{ metric_name }}' -- required
AND region = '{{ region }}' -- required
;