Pinterest needed a unified, trustworthy metrics system for business decisions and massive experiment scale.

The previous ad-hoc pipelines caused slow delivery, inconsistent availability, duplicate metrics and drift in metadata.

The team solved it by: 👉 Store each metric as a YAML spec in a Git repo for versioned, reviewed definitions. 👉 Generate a dedicated Airflow DAG per metric that compiles SQL, runs quality checks and backfills automatically. 👉 Publish metrics to DataHub, Helium, Superset and StarRocks via flags in the spec, enabling discovery and agent access.

The parts that matter: 1️⃣ YAML spec in Git - single source of truth with code review and history 2️⃣ Airflow DAG per metric - isolated scheduling, retries and resource tuning

Nearly 150 new metrics are created each month and over 98% of experimentation metrics flow through Metrics Board, saving two engineering-months on a high-profile revamp.

Each metric runs in its own Airflow DAG, which adds orchestration overhead and requires managing many DAGs. The system also relies on users providing accurate temporal columns and validation rules, so poor definitions can still produce low-quality metrics despite the platform's checks.

How do you balance the overhead of per-metric DAGs with the need for rapid metric iteration?