Available Metrics

The following metrics are supported by Metric Monitors. Users can also define custom metrics using SQL. The metric names for Monitors as Code (MaC) config are listed in the MaC Name column for each metric.

Pipeline

Metrics that detect freshness and volume anomalies. Often used when at least one segmentation field is selected. The traditional Pipeline Observability monitors do not support segmentation, so segmented freshness and volume monitoring are addressed through these metrics.

MetricDescriptionThreshold TypesMaC Name
Row countAlerts to unusual spikes or drops in the count of rowsMLROW_COUNT_CHANGE
Relative row count (%)Alerts to unusual spikes or drops in the count of rows for a particular segment, relative to the overall number of rows (learn more)MLRELATIVE_ROW_COUNT
Time since last change in row countAlerts to unusually long periods of time since the last change in row countMLTIME_SINCE_LAST_ROW_COUNT_CHANGE

Uniqueness

Uniqueness metrics check for duplicates in unique keys like UUIDs, and for changes in cardinality.

MetricDescriptionColumn TypesThreshold TypesMaC Name
Unique (%)Percentage of unique values across all rowsAllManual & MLUNIQUE_RATE
Unique (count)Count of unique valuesAllManualUNIQUE_COUNT
Duplicate (count)Count of duplicate values, calculated as the difference between the total number of rows with non-null values and total number of distinct non-null valuesAllManualDUPLICATE_COUNT

Completeness

Completeness metrics check for ways that data can be null or otherwise unpopulated.

MetricDescriptionColumn TypesThreshold TypesMaC Name
Null (%)Percentage of rows where value is nullAllManual & MLNULL_RATE
Null (count)Count of rows with null valueAllManualNULL_COUNT
Non-null (count)Count of rows with non-null valueAllManualNON_NULL_COUNT
Empty string (%)Percentage of rows where the value is an empty stringStringManual & MLEMPTY_STRING_RATE
Empty string (count)Count of rows where the value is an empty stringStringManualEMPTY_STRING_COUNT
All spaces (%)Percentage of rows where the text value is whitespace onlyStringManual & MLTEXT_ALL_SPACE_RATE
All spaces (count)Count of rows where the text value is whitespace onlyStringManualTEXT_ALL_SPACE_COUNT
NaN (%)Percentage of rows with a value of NaN (Not a Number), meaning the value is undefinedNumericManual & MLNAN_RATE
NaN (count)Count of rows with a value of NaN (Not a Number), meaning the value is undefinedNumericManualNAN_COUNT
"none" or "null" (%)Percentage of rows where the text value is a null keyword ("none", "null", "nil", "nothing" or "n/a")StringManual & MLTEXT_NULL_KEYWORD_RATE
"none" or "null" (count)Count of rows where the text value is a null keyword ("none", "null", "nil", "nothing" or "n/a")StringManualTEXT_NULL_KEYWORD_COUNT

Distribution

Distribution metrics check for shifts in the numeric profile of data.

MetricDescriptionColumn TypesThreshold TypesMaC Name
MeanAverage value across all rowsNumericManual & MLNUMERIC_MEAN
MedianMedian value across all rowsNumericManual & MLNUMERIC_MEDIAN
MinMinimum value across all rowsNumericManual & MLNUMERIC_MIN
MaxMaximum value across all rowsNumericManual & MLNUMERIC_MAX
20th percentile20th percentile of valuesNumericManual & MLPERCENTILE_20
40th percentile40th percentile of valuesNumericManual & MLPERCENTILE_40
60th percentile60th percentile of valuesNumericManual & MLPERCENTILE_60
80th percentile80th percentile of valuesNumericManual & MLPERCENTILE_80
Zero (%)Percentage rows with value equal to zeroNumericManual & MLZERO_RATE
Zero (count)Count of rows with value equal to zeroNumericManualZERO_COUNT
Negative (%)Percentage of rows that have a negative valueNumericManual & MLNEGATIVE_RATE
Negative (count)Count of rows that have a negative valueNumericManualNEGATIVE_COUNT
Standard deviationStandard deviation of valuesNumericManual & MLNUMERIC_STDDEV
SumSum of values across all rowsNumericManualSUM
True (%)Percentage of rows where the value is trueBooleanManual & MLTRUE_RATE
True (count)Count of rows where the value is trueBooleanManualTRUE_COUNT
False (%)Percentage of rows where the value is falseBooleanManual & MLFALSE_RATE
False (count)Count of rows where the value is falseBooleanManualFALSE_COUNT

Validity

Validity metrics check that values are honoring expected and usable formats, including common data entry errors.

MetricDescriptionColumn TypesThreshold TypesMaC Name
String length maxMaximum character lengthStringManualTEXT_MAX_LENGTH
String length minMinimum character lengthStringManualTEXT_MIN_LENGTH
String length meanAverage character lengthStringManualTEXT_MEAN_LENGTH
String length standard deviationStandard deviation of character lengthStringManualTEXT_STD_LENGTH
Integer (%)Percentage of rows where the text value is an integerStringManual & MLTEXT_INT_RATE
Not integer (count)Count of rows where the text value is not an integerStringManualTEXT_NOT_INT_COUNT
Float (%)Percentage of rows where the text value is a floating-point numberStringManual & MLTEXT_NUMBER_RATE
Not float (count)Count of rows where the text value is not a floating-point numberStringManualTEXT_NOT_NUMBER_COUNT
UUID (%)Percentage of rows where the text value is a UUID (e.g., b391e7d2-80e0-4749-8c60-c76031c43dfe). The comparison is case insensitive.StringManual & MLTEXT_UUID_RATE
Not UUID (count)Count of rows where the text value is not a UUID (e.g., b391e7d2-80e0-4749-8c60-c76031c43dfe). The comparison is case insensitive.StringManualTEXT_NOT_UUID_COUNT
SSN (%)Percentage of rows where the text value is formatted as Social Security Number from the United States (e.g., 123-45-6789)StringManual & MLTEXT_SSN_RATE
Not SSN (count)Count of rows where the text value is not formatted as Social Security Number from the United States (e.g., 123-45-6789)StringManualTEXT_NOT_SSN_COUNT
USA phone number (%)Percentage of rows where the text value is a USA phone number (e.g., (123) 456-7890, +1 (123) 456-7890 etc)StringManual & MLTEXT_US_PHONE_RATE
Not USA phone number (count)Count of rows where the text value is not a USA phone number (e.g., (123) 456-7890, +1 (123) 456-7890 etc)StringManualTEXT_NOT_US_PHONE_COUNT
USA state code (%)Percentage of rows where the text value is a USA state code (e.g., TX)StringManual & MLTEXT_US_STATE_CODE_RATE
Not USA state code (count)Count of rows where the text value is not a USA state code (e.g., TX)StringManualTEXT_NOT_US_STATE_CODE_COUNT
USA ZIP code (%)Percentage of rows where the text value is a USA ZIP code (e.g., 94109)StringManual & MLTEXT_US_ZIP_CODE_RATE
Not USA ZIP code (count)Count of rows where the text value is not a USA ZIP code (e.g., 94109)StringManualTEXT_NOT_US_ZIP_CODE_COUNT
Email (%)Percentage of rows where the text value is an email address (e.g., [email protected])StringManual & MLTEXT_EMAIL_ADDRESS_RATE
Not email (Count)Count of rows where the text value is not an email address (e.g., [email protected])StringManualTEXT_NOT_EMAIL_ADDRESS_COUNT
Timestamp (%)Percentage of rows where the text value is an ISO-8601 format date or timestamp (e.g., 2023-01-12 16:50:11.045746 +00:00, 2023-01-12T16:50:11Z)StringManual & MLTEXT_TIMESTAMP_RATE
Not timestamp (count)Count of rows where the text value is not an ISO-8601 format date or timestamp (e.g., 2023-01-12 16:50:11.045746 +00:00, 2023-01-12T16:50:11Z)StringManualTEXT_NOT_TIMESTAMP_COUNT
In past (%)Percentage of rows where the value is a date or time occurring before the time when the metric is evaluated, with a granularity of seconds used for comparisonDateManual & MLPAST_TIMESTAMP_RATE
In past (count)Count of rows where the value is a date or time occurring before the time when the metric is evaluated, with a granularity of seconds used for comparisonDateManualPAST_TIMESTAMP_COUNT
In future (%)Percentage of rows where the value is a date or time occurring after the time when the metric is evaluated, with a granularity of seconds used for comparisonDateManual & MLFUTURE_TIMESTAMP_RATE
In future (count)Count of rows where the value is a date or time occurring after the time when the metric is evaluated, with a granularity of seconds used for comparisonDateManualFUTURE_TIMESTAMP_COUNT
Unix time 0 (%)Percentage of rows where the value is Unix time 0DateManual & MLUNIX_ZERO_RATE
Unix time 0 (count)Count of rows where the value is Unix time 0DateManualUNIX_ZERO_COUNT

Custom

Users can define custom metrics using SQL. This is helpful to create a metric that:

  • Isn't available above, such asAPPROX_PERCENTILE(order_amount, 0.99)
  • References multiple fields at once, such as
    • AVG(price + tax_collected)
    • COUNT(DISTINCT(CONCAT(invoice_number, line_item)))/COUNT(*)

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.

To create a custom metric, provide a metric name and a SQL expression, then test the metric to confirm it works.

To create a custom metric, provide a metric name and a SQL expression, then test the metric to confirm it works.


Relative row count

Relative row count will alert to sudden shifts in the distribution of categorical fields. It tracks the percentage of rows in a given segment compared to the overall number of rows, and alerts when the percentage for a segment suddenly spikes higher or drops lower. Because of this, segmentation is required when using this metric. Common examples:

  • An events table has an app_version field. The user would like to be alerted if any app_version is suddenly receiving a disproportionately high or low number of rows relative to overall volume, as it may indicate issues with that version.
  • An orders table has a country field. The user would like to be alerted if any country is suddenly receiving a disproportionately high or low number of rows relative to overall volume, as it may indicate an issue with processing order from that country.

Relative row count can also alert when new segments appear, so long as they represent a significant shift in the distribution of rows. However, to always alert when any new segment appears, we recommend configuring a Validation monitor with the is not in set operator.

Relative row count was formerly its own monitor type called Dimension Tracking. Starting in October 2024, Dimension Tracking monitors could no longer be created through the UI and users were guided to use relative row count instead.