Custom metric metadata
To add more context to data points and their dimensions, your custom metric can carry additional useful information, such as the unit of measurement, display name, and value ranges.
You can provide such information via custom metric metadata. Metadata and data points are stored independently from data points and tied together by the metric key. You can push data points and set metadata in any order.
You cannot provide metadata for built-in or calculated metrics; metadata is supported only for custom ingested metrics.
Available parameters
The following parameters are available for metric metadata.
Parameter | Type | Description |
---|---|---|
displayName | string | The name of the metric in the user interface. |
description | string | A short description of the metric. |
unit | string | The unit of the metric. Find the possible values in the description of the unit field for built-in metrics. |
tags | string[] | A list of tags applied to the metric. |
metricProperties | A list of the metric's properties. | |
dimensions | A list of the metric's dimensions. |
The MetricProperties
object
Properties of a metric.
Parameter | Type | Description |
---|---|---|
minValue | integer | The minimum allowed value of the metric. |
maxValue | integer | The maximum allowed value of the metric. |
rootCauseRelevant | boolean | Whether ( A root-cause relevant metric represents a strong indicator for a faulty component. |
impactRelevant | boolean | Whether ( An impact-relevant metric is highly dependent on other metrics and changes because an underlying root-cause metric has changed. |
valueType | string | The type of the metric's value. You have these options:
|
latency | integer | The reporting delay of the metrics, in minutes. The delay caused by constraints of cloud vendors or other third-party data sources that leads to a latency in data ingest on the Dynatrace side. |
The MetricDimensions
object
A dimension of the metric.
Parameter | Type | Description |
---|---|---|
key | string | The key of the dimension to be used in the ingestion protocol. |
displayName | string | The name of the dimension in the user interface. |
Set metric metadata
Use the POST an object call of the Settings API to provide metadata for your metric. Use the following parameters in the payload:
Field | Value |
---|---|
scope | metric-{your-metric-key} |
schemaId | builtin:metric.metadata |
value | The desired set of metadata. See the available fields above. |
1[2 {3 "scope": "metric-business.shop.revenue",4 "schemaId": "builtin:metric.metadata",5 "value": {6 "displayName": "Total revenue",7 "description": "Total store revenue by region, city, and store",8 "unit": "Unspecified",9 "tags": ["KPI", "Business"],10 "metricProperties": {11 "maxValue": 1000000,12 "minValue": 0,13 "rootCauseRelevant": false,14 "impactRelevant": true,15 "valueType": "score",16 "latency": 117 },18 "dimensions": [19 {20 "key": "city",21 "displayName": "City name"22 },23 {24 "key": "country",25 "displayName": "Country name"26 },27 {28 "key": "region",29 "displayName": "Sales region"30 },31 {32 "key": "store",33 "displayName": "Store #"34 }35 ]36 }37 }38]
Alternatively, you can:
- Send metadata via the ingestion protocol.
- Configure a metric's metadata in Metrics browser.
View metric metadata
You can retrieve the metadata of a metric via the GET metric descriptor call of the Metrics v2 API or via the Metrics browser.