我剛在我的 Postgres 實例上設置了 sqlcommenter。我在我的 ORM 上使用了一個鉤子來附加元數據,然後使用 pg_stat_statements 獲取統計數據並將其導出到 Prometheus。非常酷。