: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
feat(signals): ship a default pre-check for the error tracking scout (#115934)
posthog[bot]0a4e950cef7b
diff --git a/products/signals/backend/test/test_scout_precheck.py b/products/signals/backend/test/test_scout_precheck.pyindex 825fac07eaae..63199a27ae18 100644--- a/products/signals/backend/test/test_scout_precheck.py+++ b/products/signals/backend/test/test_scout_precheck.py@@ -235,6 +235,8 @@ class TestSkillDefaultPrecheck(ClickhouseTestMixin, BaseTest):("web_vitals_quiet", "signals-scout-web-vitals", "$web_vitals", 24 * 8, "skip"),("web_analytics_active", "signals-scout-web-analytics", "$pageview", 24 * 6, "run"),("web_analytics_quiet", "signals-scout-web-analytics", "$pageview", 24 * 8, "skip"),+ ("error_tracking_active", "signals-scout-error-tracking", "$exception", 24 * 6, "run"),+ ("error_tracking_quiet", "signals-scout-error-tracking", "$exception", 24 * 8, "skip"),])def test_product_presence_defaults_skip_only_on_absence(self, _name, skill, event, hours_ago, outcome) -> None:diff --git a/products/signals/skills/signals-scout-error-tracking/SKILL.md b/products/signals/skills/signals-scout-error-tracking/SKILL.mdindex 04a8dfacf3f8..6cb689e2f06d 100644--- a/products/signals/skills/signals-scout-error-tracking/SKILL.md+++ b/products/signals/skills/signals-scout-error-tracking/SKILL.md@@ -15,6 +15,12 @@ allowed_tools:metadata:owner_team: signalsscope: error_tracking+scout-precheck-query: |+ SELECT 1 AS has_exceptions+ FROM events+ WHERE event = '$exception'+ AND timestamp > {now} - INTERVAL 7 DAY+ LIMIT 1---# Signals scout: error tracking@@ -33,6 +39,8 @@ If a history reader is unavailable or access is denied, stop using that reader f## Quick close-out: is error tracking even loud?+A scheduled run can start with a `<precheck_result>` block. The block means that at least one `$exception` event arrived in the last 7 days, so error tracking is in use. When the block is present, skip the `not-in-use` check. The block holds no count, so the baseline close-out still applies.+If `$exception` is absent from `top_events` or its `count` is at baseline (no fresh 24h activity, `recent_24h_count` ≪ `count / 7`), error tracking probably isn't where the signal is today. Cheap scratchpad entry + close out:- key: `not-in-use:error_tracking:team{team_id}` (if `$exception` is absent entirely) **or** `pattern:error_tracking:baseline-team{team_id}` (if it fires at a steady baseline with no fresh burst)