: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
fix(alerts): use shared telemetry in insight SLOs (#74850)
Matt Pua9a227e7a5c81
diff --git a/terraform/us/project-2/team-analytics-platform/slos/insights.tf b/terraform/us/project-2/team-analytics-platform/slos/insights.tfindex 19b52e16997f..f3dacb1e9a4a 100644--- a/terraform/us/project-2/team-analytics-platform/slos/insights.tf+++ b/terraform/us/project-2/team-analytics-platform/slos/insights.tf@@ -99,14 +99,18 @@ locals {name_prefix = "SLO: Alert checks"description = "Rolling burn rate for alert checks."error_budget = 0.01- regions = ["us"]+ regions = ["us", "eu"]daily_sql = <<-SQLSELECTtoDate(timestamp) AS date,- countIf(event = 'alert check') AS total,- countIf(event = 'alert check failed') AS failures+ count() AS total,+ countIf(properties.outcome = 'failure' OR properties.alert_state = 'Errored') AS failuresFROM events- WHERE event IN ('alert check', 'alert check failed')+ WHERE event = 'slo_operation_completed'+ AND properties.operation = 'alert_check'+ AND properties.alert_type = 'insight'+ AND properties.region = '{{REGION}}'+ AND properties.skip_reason IS NULLAND timestamp >= now() - INTERVAL 30 DAYGROUP BY dateSQL@@ -121,20 +125,24 @@ locals {name_prefix = "SLO: Alert timeliness"description = "Rolling burn rate for alert check timeliness."error_budget = 0.01- regions = ["us"]+ regions = ["us", "eu"]daily_sql = <<-SQLWITH alert_checks AS (SELECT- properties.alert_id AS alert_id,+ properties.resource_id AS alert_id,properties.calculation_interval AS calculation_interval,timestamp,lagInFrame(timestamp) OVER (- PARTITION BY properties.alert_id, properties.calculation_interval+ PARTITION BY properties.resource_id, properties.calculation_intervalORDER BY timestamp ASCROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) AS prev_checkFROM events- WHERE event IN ('alert check', 'alert check failed')+ WHERE event = 'slo_operation_completed'+ AND properties.operation = 'alert_check'+ AND properties.alert_type = 'insight'+ AND properties.region = '{{REGION}}'+ AND properties.skip_reason IS NULLAND properties.calculation_interval IN ('hourly', 'daily', 'weekly', 'monthly')AND timestamp >= now() - INTERVAL 45 DAY)