: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(error-tracking): run digest team enumeration on the offline cluster (#62715)
Catalin Irimiee593f8b0b128
diff --git a/products/error_tracking/backend/weekly_digest.py b/products/error_tracking/backend/weekly_digest.pyindex 96ab6c7e385f..3e37ee9a3eb9 100644--- a/products/error_tracking/backend/weekly_digest.py+++ b/products/error_tracking/backend/weekly_digest.py@@ -102,6 +102,7 @@ def auto_select_project_for_user(user: Any, org_id: int, team_exception_counts:def get_exception_counts(team_ids: list[int] | None = None) -> list:"""Teams with at least one exception in the last 7 days, used for digest routing."""from posthog.clickhouse.client import sync_execute+ from posthog.clickhouse.workload import Workloadtag_queries(product=ProductKey.ERROR_TRACKING, name="weekly_digest:exception_counts")@@ -121,7 +122,8 @@ def get_exception_counts(team_ids: list[int] | None = None) -> list:{team_filter}"""- results = sync_execute(query, query_params)+ # Cross-team scan for a weekly batch job — keep it off the online cluster.+ results = sync_execute(query, query_params, workload=Workload.OFFLINE)return results if isinstance(results, list) else []