RYP-G3 in Wave P.
- @railyard/insights-web: page views (with client-side route changes),
events, identify, and LCP, INP, CLS, FCP and TTFB per page view, sent once
when the page is hidden or the route changes; no cookies, no storage, Do
Not Track and consent respected. src/metrics.ts adapts MIT-licensed code
(NOTICE keeps the licence) with two changes that match Chrome's field
reporting: LCP stops at the first input, and INP picks its percentile from
the page's interaction count. On six worked fixtures (after-click paint,
two shift windows with a post-input shift, prerender activation, 120
interactions, multi-event interactions) every metric and the p75 are
within 10% of Chrome's values.
- Edge collector and ingest carry `performance` events (the five metrics,
in the upstream ranges) into upstream event type 5 rows.
- Insights GET /api/v1/tenants/{org}/vitals: p75 per app, per UTC day, and
in the day before and after each given deploy time (up to 10); ratings
from the published thresholds; org-scoped (SQL test with hand p75s).
- Console: the Page speed screen (only with RAILYARD_REPLAY_LIVE=1) and the
Scribase bridge `insights` answer gain `vitals` (p75 cells and one marker
per deploy from the console's own deploy records, so a deploy is marked on
the next read); a vitals failure never hides the rest of the tab.
The Scribase Analytics sub-tab (carve-out) joins these markers to the
environment's error issues: "This deploy raised errors by N" links to the
Errors tab.
Tests: console 128/128 (view model, bridge marker, flag gate, copy lint),
insights-web 12/12 (fixtures, client, copy), insights fork 12/12, edge
19/19, tsc clean.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>