diff --git a/src/content/docs/data-apis/understand-data/metric-data/query-metric-data-type.mdx b/src/content/docs/data-apis/understand-data/metric-data/query-metric-data-type.mdx index 864c1b86e93..2002396c0e5 100644 --- a/src/content/docs/data-apis/understand-data/metric-data/query-metric-data-type.mdx +++ b/src/content/docs/data-apis/understand-data/metric-data/query-metric-data-type.mdx @@ -211,10 +211,13 @@ You can use `getField()` to extract those fields. For example, if you want to us The average value of a metric is computed as `total` over `count`, so the following query returns metric data where the result of the `average()` value function is greater than 2. ``` - FROM Metric SELECT average(apm.service.transaction.duration) WHERE appName = 'MyApp' AND getField(apm.service.transaction.duration, total) / getField(apm.service.transaction.duration, count) > 2 + FROM Metric + SELECT average(apm.service.transaction.duration) + WHERE appName = 'MyApp' + AND getField(apm.service.transaction.duration, total) / getField(apm.service.transaction.duration, count) > 2 ``` - or with the shorthand: + Or, you can use the shorthand: ``` FROM Metric SELECT average(apm.service.transaction.duration) WHERE appName = 'MyApp' AND apm.service.transaction.duration[total] / apm.service.transaction.duration[count] > 2 @@ -227,12 +230,16 @@ You can use `getField()` to extract those fields. For example, if you want to us This example query returns a list of gauge metrics: ``` - FROM Metric SELECT uniques(metricName) WHERE getField(%, type) = 'gauge' + FROM Metric + SELECT uniques(metricName) + WHERE getField(%, type) = 'gauge' ``` - or with the shorthand: + Or, you can use the shorthand: ``` - FROM Metric SELECT uniques(metricName) WHERE %[type] = 'gauge' + FROM Metric + SELECT uniques(metricName) + WHERE %[type] = 'gauge' ``` Note the use of the `%` wildcard to target any matching `metricName`.