Skip to content

feat(web-analytics): roll no-join fast paths to all us cloud teams - #70940

Merged
lricoy merged 1 commit into
masterfrom
lricoy/web-analytics-no-join-100-percent
Jul 15, 2026
Merged

feat(web-analytics): roll no-join fast paths to all us cloud teams#70940
lricoy merged 1 commit into
masterfrom
lricoy/web-analytics-no-join-100-percent

Conversation

@lricoy

@lricoy lricoy commented Jul 15, 2026

Copy link
Copy Markdown
Member

Problem

The no-join fast paths (#70746) rolled to 50% of US Cloud teams via deterministic team bucketing (#70906). Production evidence after 14 hours at 50%:

Metric Pre-merge (join, eligible population, 24h) Post-merge (no-join, 14h at 50%)
Paths tile p50 816ms 384ms (2.1x)
Paths tile p95 3.6s 815ms (4.4x)
Paths tile p99 7.3s 2.3s (3.2x)
Paths tile max memory 33.4 GiB 741 MiB (45x)
Overview max memory 21.9 GiB 196 MiB (114x)
Teams served - 374 (674 paths servings + 100 overview)
Query-level fast-path failures - 0 (only anomaly: one team's 1-second burst into the pre-existing 30-concurrent-queries OFFLINE cap)
Out-of-bucket servings - 0

Coverage math: ~86% of user-facing web analytics queries reaching ClickHouse are unfiltered and therefore eligible; at 50% team bucketing roughly half of that population is served today, so this PR approximately doubles fast-path coverage to all eligible US traffic.

(Eligible population = user-facing, unfiltered, no test-account filtering - the class the fast path serves. The post p99 tail is bounded-memory queue contention on the dogfooding team, not query cost.)

Changes

One line: the US Cloud default for WEB_ANALYTICS_NO_JOIN_ROLLOUT_PERCENT goes 50 → 100. Every US team's unfiltered overview and paths queries take the fast path on deploy. EU stays at 0 (pending its ClickHouse 26.6 upgrade convergence + separate verification), self-hosted and tests unaffected. The env var remains a two-way override and the kill switch.

How did you test this code?

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

Docs update

No user-facing behavior change (results parity verified; latency improves).

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

  • Final notch of the staged rollout Lucas directed (team 2 → 50% → 100%), backed by the fleet evidence table above collected via query_log monitoring.
  • Skills invoked: /evaluating-web-analytics-performance.

@lricoy lricoy self-assigned this Jul 15, 2026
@trunk-io

trunk-io Bot commented Jul 15, 2026

Copy link
Copy Markdown

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

@lricoy
lricoy marked this pull request as ready for review July 15, 2026 13:58
@lricoy
lricoy enabled auto-merge (squash) July 15, 2026 13:58
@lricoy lricoy added the stamphog Request AI approval (no full review) label Jul 15, 2026
@lricoy
lricoy requested a review from a team July 15, 2026 13:59
@greptile-apps

greptile-apps Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "feat(web-analytics): roll no-join fast p..." | Re-trigger Greptile

@stamphog stamphog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One-line rollout-percentage config bump backed by production evidence, with an existing kill switch and boundary tests; author has STRONG familiarity with this exact file.

  • Author wrote 100% of the modified lines and has 12 merged PRs in these paths (familiarity STRONG).
  • 👍 on the PR from chatgpt-codex-connector[bot], greptile-apps[bot], hex-security-app[bot].
Gate mechanics and policy version
Gate Result
prerequisites all clear
deny-list no deny categories matched
size 2L, 1F substantive — within ceiling
tier T1-agent / T1a-trivial (2L, 1F, single-area, feat)
stamphog 2.0.0b3 .stamphog/policy.yml @ b821150 · reviewed head d624f52

@github-actions

github-actions Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

🤖 CI report

Playwright — all passed

All tests passed.

View test results →

ℹ️ ClickHouse migration SQL — 1 migration(s)

ClickHouse migration SQL per cloud environment

  • unset
    • all
      CREATE OR REPLACE VIEW custom_metrics_test
          AS SELECT
              'ClickHouseCustomMetric_Test' AS name,
              map('instance', hostname()) AS labels,
              1 AS value,
              'Test to check that the metric endpoint is working' AS help,
              'gauge' AS type
      CREATE OR REPLACE VIEW custom_metrics
          AS SELECT * REPLACE (toFloat64(value) as value)
          FROM custom_metrics_test
  • US, EU, DEV
    • events, shufflehog
      CREATE OR REPLACE VIEW custom_metrics_test
          AS SELECT
              'ClickHouseCustomMetric_Test' AS name,
              map('instance', hostname()) AS labels,
              1 AS value,
              'Test to check that the metric endpoint is working' AS help,
              'gauge' AS type
      CREATE OR REPLACE VIEW custom_metrics
          AS SELECT * REPLACE (toFloat64(value) as value)
          FROM custom_metrics_test

@lricoy
lricoy merged commit 1d9ced0 into master Jul 15, 2026
441 of 481 checks passed
@lricoy
lricoy deleted the lricoy/web-analytics-no-join-100-percent branch July 15, 2026 14:36
@deployment-status-posthog

deployment-status-posthog Bot commented Jul 15, 2026

Copy link
Copy Markdown

Deploy status

Environment Status Deployed At Workflow
dev ✅ Deployed 2026-07-15 15:04 UTC Run
prod-us ✅ Deployed 2026-07-15 15:30 UTC Run
prod-eu ✅ Deployed 2026-07-15 15:30 UTC Run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stamphog Request AI approval (no full review)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant