Object Metrics & Freshness

Object-level monitoring metrics and data freshness tracking

Object-level metrics collect information about tables and views as a whole — row counts, schema metadata, definition hashes, and data freshness.

monitor-chart-object

Object-Level Metrics

Key
Type
Description

metadata

bool

Collect schema information — column names, types, and table type. Enables schema change detection.

row_count

bool

Count the total number of rows via COUNT(*). Also used as a baseline for anomaly detection.

body_md5

bool

Track the MD5 hash of view or stored procedure definitions to detect code changes. Not applicable to regular tables.

Alert on Change

Use alert_on_change to specify which types of changes should trigger alerts:

Change Type
Description

name

Object was renamed

type

Object type changed

timestamp

Last modified timestamp changed

size

Object size changed

body

View or procedure definition changed

count

Row count changed

Data Freshness

Freshness monitoring detects when data becomes stale. Combine freshness_column with freshness_threshold to track data age and receive alerts when tables fall behind their expected update schedule.

How It Works

When freshness_column is set, Sling queries MAX(freshness_column) to determine the timestamp of the most recent data. If the result is older than freshness_threshold, a data_stale event is fired.

If only freshness_threshold is set without freshness_column, Sling falls back to the object's metadata timestamp (last DDL or modification time). This is less precise for tables that receive INSERT operations without schema changes.

Duration Format

Thresholds use duration strings composed of one or more units:

Unit
Meaning
Example

d

Days

7d = 7 days

h

Hours

24h = 24 hours

m

Minutes

30m = 30 minutes

s

Seconds

60s = 60 seconds

Units can be combined: "1d12h" = 1 day and 12 hours, "1h30m" = 1 hour and 30 minutes.

Basic Freshness Check

Freshness in Defaults

Apply a default freshness configuration to all objects, then override per table as needed:

circle-exclamation

Complete Example

Last updated

Was this helpful?