Custom Metrics
In Metric Monitors, users can define custom metrics using SQL. Both machine learning and manual thresholds are supported for custom metrics.
Defining a custom metric is helpful when:
- The desired metric isn't one of the available metrics. For example:
APPROX_PERCENTILE(order_amount, 0.99)
. This metric measures the 99th percentile of order_amount. While there is an available metric for 80th percentile, there is not 99th, and so a custom metric is needed.
- The user needs to references multiple fields in the metric. For example:
AVG(price + tax_collected)
: this metric measures the average value of price plus tax_collected.COUNT(DISTINCT(CONCAT(invoice_number, line_item)))/COUNT(*)
: this metric measures the uniqueness (%) of the concatenation of invoice_number and line_item.
To create a custom metric, select Custom in the metric dropdown in the Define alert conditions section of a Metric monitor. Currently, only manual thresholds are supported for custom metrics.
Updated 10 days ago