Create a tag configuration
POST {{baseUrl}}/api/v2/metrics/:metric_name/tags
Create and define a list of queryable tag keys for an existing count/gauge/rate/distribution metric.
Optionally, include percentile aggregations on any distribution metric or configure custom aggregations
on any count, rate, or gauge metric. By setting exclude_tags_mode
to true the behavior is changed
from an allow-list to a deny-list, and tags in the defined list will not be queryable.
Can only be used with application keys of users with the Manage Tags for Metrics
permission.
Request Body
{"data"=>{"id"=>"test.metric.latency", "type"=>"manage_tags", "attributes"=>{"tags"=>["app", "datacenter"], "metric_type"=>"count", "aggregations"=>[{"space"=>"sum", "time"=>"sum"}, {"space"=>"sum", "time"=>"count"}], "exclude_tags_mode"=>false, "include_percentiles"=>true}}}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Accept | string |
RESPONSES
status: Created
{"data":{"attributes":{"aggregations":[{"space":"avg","time":"avg"}],"created_at":"2020-03-25T09:48:37.463835Z","metric_type":"gauge","modified_at":"2020-04-25T09:48:37.463835Z","tags":["app","datacenter"]},"type":"manage_tags"}}