Skip to content

Enable opt-in frontend health telemetry in released images - #117

Merged
mzupan merged 2 commits into
mainfrom
codex/frontend-runtime-health-telemetry
Nov 15, 2026
Merged

mzupan merged 2 commits into
mainfrom
codex/frontend-runtime-health-telemetry

Conversation

@mzupan

@mzupan mzupan commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Released images currently compile out the RUM integration, leaving existing cache and polling health events unavailable through deployment configuration. Add validated public runtime RUM settings with collection disabled by default, retain Vite development fallbacks, use the package build version and deployment environment, and emit a startup event after SDK initialization.

Deployment contract: RUM_ENABLED=false, RUM_ENDPOINT=/api/v1/frontend/telemetry, RUM_APP_NAME=rush-ui, existing RUSH_ENVIRONMENT. Endpoints must be same-origin paths. No browser credential setting is introduced; the existing privacy scrubber remains in place.

Validation: 18 focused RUM configuration/privacy tests; seven valid/invalid entrypoint rendering cases; full production build and typecheck. Helm wiring is a separate follow-up. Independent main-based PR.

Combined validation: all six frontend health PRs merge together without conflicts. The integrated suite passes 646 tests in 107 files and the production build/typecheck. A production-bundle Chrome smoke with mocked ingestion verified runtime opt-in, actual package version/environment, API/body events, failed lazy-route navigation, investigation completion/malformed-event counts and browser offline/recovery duration. Eleven custom event types arrived through the SDK and production privacy scrubber without query text or user identifiers in their attributes.

Authenticated collection prerequisite: the default is the dedicated session-authenticated POST /api/v1/frontend/telemetry endpoint, implemented in query-api #100, which must merge and deploy before enabling this collector. Generic /api/v1/rum/ingest intentionally rejects browser session credentials and is not the self-health default. Cookies are retained; no embedded ingest key or credential-isolation bypass is introduced. The browser fixture verifies the default path and cookie transport; real handler authorization/payload retention validation is coordinated with the API PR.

Backend acceptance verification: query-api #100 passed real-cookie JSON and text/plain beacon requests against isolated ClickHouse, including viewer-role use, tenant binding and RUM disable gates. Forged/revoked cookies and hostile/missing Origin are denied; generic ingest remains session-denied. Browser-captured event/attribute fixtures are retained by the real Rust sanitizer. Custom app names are stored in the reserved rush-ui: namespace; build version/environment remain intact.

@mzupan
mzupan merged commit 527bcca into main Nov 15, 2026
4 checks passed
@mzupan
mzupan deleted the codex/frontend-runtime-health-telemetry branch November 15, 2026 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant