:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
use std::sync::Arc;
use async_trait::async_trait;
use super::compile::CompiledMetricRule;
/// Node reads enabled rows ordered by `created_at` and keeps the compiled rules for 30 seconds.
#[async_trait]
pub trait MetricRulesSource: Send + Sync {
async fn get_compiled_rules(
&self,
team_id: i64,
) -> anyhow::Result<Arc<Vec<CompiledMetricRule>>>;
}