: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
chore(data-catalog): point monitoring doc at the rebuilt usage dashboard (#114927)
Thiago Salvatore510e1980140e
diff --git a/products/data_catalog/docs/production-monitoring.md b/products/data_catalog/docs/production-monitoring.mdindex 87c2bc7dba85..807617a1a487 100644--- a/products/data_catalog/docs/production-monitoring.md+++ b/products/data_catalog/docs/production-monitoring.md@@ -12,17 +12,19 @@ The first canary dispatcher is the local [`semantic_layer_canary.py`](../scripts## 1. Dashboard tiles (HogQL over existing telemetry)-Tile group `7 · Agent behavior` on the "Data catalog usage" dashboard (project 2, dashboard 1902365):+The `7 · Agent behavior` insights in project 2. They used to sit on the "Data catalog usage" dashboard (1902365). That dashboard now tracks customer adoption only, so open these insights directly:-- `7 · Catalog-first rate for KPI sessions`: share of KPI-intent SQL sessions whose metrics-catalog lookup preceded their first data-bearing query. Carries a fleet-wide series and a catalog-enabled series (`mcp_data_catalog_enabled = true`, property stamped from Aug 5, 2026 until the flag removal deploys).-- `7 · KPI sessions that skip the catalog`: KPI-intent sessions with raw SQL and no catalog lookup or `data-catalog-metric-run` call, same two series.-- `7 · Semantic-layer lookups in SQL`: weekly lookups against `information_schema.metrics`, the `certification` column on `information_schema.tables`, and `information_schema.relationships`.-- `7 · KPI derivations vs agent proposals`: derivations without catalog engagement next to sessions where an agent called a catalog write tool.+- `7 · Catalog-first rate for KPI sessions` (`PAXBDDsr`): share of KPI-intent SQL sessions whose metrics-catalog lookup preceded their first data-bearing query. Carries a fleet-wide series and a catalog-enabled series (`mcp_data_catalog_enabled = true`, property stamped from Aug 5, 2026 until the flag removal deploys).+- `7 · KPI sessions that skip the catalog` (`NVMOdiEl`): KPI-intent sessions with raw SQL and no catalog lookup or `data-catalog-metric-run` call, same two series.+- `7 · Semantic-layer lookups in SQL` (`tMiKDSqw`): weekly lookups against `information_schema.metrics`, the `certification` column on `information_schema.tables`, and `information_schema.relationships`.+- `7 · KPI derivations vs agent proposals` (`mkSFGkpF`): derivations without catalog engagement next to sessions where an agent called a catalog write tool.- `7 · Semantic layer judge verdicts`: daily pass/fail/not-applicable counts from the three judge evaluations (matches both the current and pre-rename evaluation names).This PR removes the `product-data-catalog` flag and the catalog reaches every org, so once the removal deploys `mcp_data_catalog_enabled` stops being stamped on new events. Historical events keep it. Any series still filtering on it matches nothing after the deploy - drop the filter from every catalog-enabled series once the removal deploys, and read the fleet-wide series instead.-Beyond group 7, the dashboard carries curation and quality tiles worth knowing: `2 · Catalog inventory (cumulative)` (running total of metrics, certification marks, accepted relationships), `3 · Review queue backlog (current)` (entities awaiting a human decision, from each entity's latest lifecycle event), and `5 · Canonical share of metric runs` (share of runs returning an approved, non-drifted result - the consumption quality signal).+The "Data catalog usage" dashboard (1902365) covers customer adoption: companies with a metric, new companies, proposed vs approved vs rejected metrics, certifications and relationships, usage by surface, and data catalog MCP clients, growth and errors. Every tile excludes PostHog Inc., and the MCP tiles count person-owned tokens only (`$mcp_scope_preset = user`), so scout runs are left out. Its header tile defines what counts as rejected.++Three older curation and quality insights left that dashboard but still exist: `2 · Catalog inventory (cumulative)` (`xtDlP7s0`, running total of metrics, certification marks, accepted relationships), `3 · Review queue backlog (current)` (`UCVLOpYk`, entities awaiting a human decision, from each entity's latest lifecycle event), and `5 · Canonical share of metric runs` (`Uw16y4G9`, share of runs returning an approved, non-drifted result - the consumption quality signal). The dashboard's `2 · Review backlog (now)` is the customer-only version of the second one.Data sources: `$mcp_tool_call` events (tool names, ordering per `$session_id`) and the per-`execute-sql` `$ai_generation` events (`$ai_output_choices` carries the SQL text; `posthog.ai_events`, ~30 day retention). Session classification is regex-heuristic: `metric-list` and SQL matching `information_schema.metrics` are catalog lookups, other `information_schema`/`system.` references are schema discovery, everything else is data-bearing; KPI intent is a keyword match on the agent's stated intent. **The keyword match is a known undercount** - the judges below carry the semantic version of the same questions, and comparing the judges' applicability share against the tiles' keyword share over the same catalog-enabled population measures the keyword gate's miss rate.@@ -41,7 +43,7 @@ Every rubric follows the same shape, and new judges should too: **classify appli### Reading the rates honestly- **Compliance rates are conditional.** A judged trace only produces a pass/fail when the premise applied; the rest are N/A. Sizing scales off the observed ~1,750 judged traces/month per 2% of traffic: the bypass judge at 25% sees on the order of 22,000 judged traces/month, the other two about 8,700 each. With roughly a tenth of sessions being metric questions, that is ~2,200 applicable verdicts/month on the bypass judge and ~870 on the others, putting about ±2 and ±3 points on the monthly compliance rate. Read the 10% judges monthly, not weekly; the bypass judge holds up weekly (~±4 points) while the gate rollout lasts. Raising rollout tightens this at proportional cost.-- **Attribute a failure by MCP consumer and client, not by distinct id.** One distinct id covers several internal agent workloads at once (Signals scout sandboxes, Desktop, tasks), so a prefix match reads as one cohort when it is many. `$mcp_consumer` plus `$mcp_client_name` on the trace's generations separates them. Dashboard tile: "7 · Bypass fails by cohort (internal fleet vs rest)".+- **Attribute a failure by MCP consumer and client, not by distinct id.** One distinct id covers several internal agent workloads at once (Signals scout sandboxes, Desktop, tasks), so a prefix match reads as one cohort when it is many. `$mcp_consumer` plus `$mcp_client_name` on the trace's generations separates them. Insight: "7 · Bypass fails by cohort (internal fleet vs rest)" (`W8ZSWfxc`).- **The applicability share is itself a result.** It is the semantic answer to "what fraction of sessions are metric questions", and dividing the tile's keyword-matched share by it gives the keyword gate's measured miss rate.- **Calibration gates publication.** Hand-read a few dozen verdicts per judge (verdict plus reasoning) before putting any pass-rate on the dashboard, and check specifically whether Haiku's reasoning is deep enough on proposal appropriateness - that judge has the subtlest call and is the candidate for moving to `claude-sonnet-4-6`.- **There is no pre-enable test path for trace-target evaluations.** `evaluation_runs` rejects trace-target re-runs against a single generation, and the Hog test endpoint does not cover LLM judges, so validation happens by enabling at a small rollout and reading verdicts. Judge failures (parse errors, provider hiccups) do not auto-disable the evaluation the way Hog errors do.@@ -56,7 +58,7 @@ Evaluation definitions are per-team database rows, not repo code; this document- **Aug 2026, post-injection audit: compliance moved out of the judged trace, so the statement became the contract.** With the injected listing live and the orphan filter applied, the bypass judge's failing population split three ways. Most fails computed measures with no governed metric and showed no trace-visible catalog consultation at all: the injection had removed the in-session lookup, and the "say no catalog metric matched" clause was a buried trailer that runs dropped while keeping the cheap `noncanonical` label (which the rubric deliberately does not credit). Nearly every pass ran one of the seeded scout-ops metrics canonically, confirming that a governed metric for the exact measure is the one robustly passing shape. The fragmentation hypothesis was confirmed but bounded: about a third of failing traces held a single generation, and about a quarter of non-scout fails had a same-user catalog lookup in a different trace the same day, invisible to the judged trace; there is no server-side conversation id to join on, so the fix is per-turn self-documentation, not plumbing. Remediations: the harness injection variants and the MCP metric-discovery steering now require opening the derivation query's stated context with `governed catalog consulted: no listed metric matched <measure> (noncanonical)` (the empty-catalog variant gained the statement too, having previously offered no pass path at all); the rubric enumerates the accepted statement forms and clarifies that supplemental drill-down SQL after running the matching canonical metric passes, since near-identical drill-down sessions had drawn opposite verdicts; and the recurring ungoverned scout measures got a seeding batch of proposed metrics. The offline suite pins the new boundaries from both sides: `scout_injected_listing_no_match` and `governed_metric_canonical_then_drilldown`.-- **Aug 2026, this PR removes the `product-data-catalog` flag, so the cohort split it fed goes away once it deploys.** The catalog is in beta for every org, so the flag is deleted along with the `mcp_data_catalog_enabled` event property it stamped. Two live assets read that property and must be edited once the removal deploys: the three judge conditions above, and the catalog-enabled series on tile group 7 (at least `7 · Catalog-first rate for KPI sessions` and `7 · Bypass fails by cohort`, insight `W8ZSWfxc` / 11010495 - sweep the dashboard for others). The judged population widens from catalog-enabled traffic to all hosted-MCP `execute-sql` traffic, so rates either side of the deploy are not directly comparable; the fleet-wide series is the continuous one.+- **Aug 2026, this PR removes the `product-data-catalog` flag, so the cohort split it fed goes away once it deploys.** The catalog is in beta for every org, so the flag is deleted along with the `mcp_data_catalog_enabled` event property it stamped. Two live assets read that property and must be edited once the removal deploys: the three judge conditions above, and the catalog-enabled series on the group 7 insights (at least `7 · Catalog-first rate for KPI sessions` and `7 · Bypass fails by cohort`, insight `W8ZSWfxc` / 11010495 - check the other group 7 insights too). The judged population widens from catalog-enabled traffic to all hosted-MCP `execute-sql` traffic, so rates either side of the deploy are not directly comparable; the fleet-wide series is the continuous one.### Retired: the deterministic Hog evaluation