Skip to content

Accept restricted frontend health telemetry using browser sessions - #100

Merged
mzupan merged 11 commits into
mainfrom
codex/frontend-session-telemetry
Nov 15, 2026
Merged

mzupan merged 11 commits into
mainfrom
codex/frontend-session-telemetry

Conversation

@mzupan

@mzupan mzupan commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Depends on #99. Merge/deploy the query-api stack in order #94 → #95 → #96 → #97 → #98 → #99 → #100. Frontend runtime telemetry PR117 and its Helm endpoint defaults consume this route after deployment.

The Rush frontend SDK sends a browser session cookie, while general RUM ingestion intentionally accepts ingest credentials. That mismatch rejected signed-in frontend health events with 403. Add a dedicated POST /api/v1/frontend/telemetry contract for validated browser sessions and retain credential isolation on every general ingest route.

The endpoint uses existing session/tenant/Origin checks, restricts writes to the server-resolved session home tenant, accepts bounded JSON fetch and text/plain beacon batches, and allowlists operational/browser-health event fields. It drops raw URLs, titles, user/session IDs, error details and trace IDs. Default app identity remains rush-ui; configured custom names are stored as rush-ui:<configured-name>. Build version/environment and allowed aggregate/histogram fields are retained.

Reuse the existing RUM signal gate, durable writer, overload handling and usage metering. Add a 64 KiB body cap, 1,000-event cap, and request limits of 120/user/minute and 1,200/tenant/minute. No server key is exposed or relayed and anonymous login-page telemetry is deliberately rejected.

Validation: cargo fmt --check; generated schema check; CI-policy Clippy; all-target/all-feature tests (860 passed for the combined query stack); SDK fixture compatibility for four real captured batches and all 15 custom events. A pinned-image disposable ClickHouse regression runs the real API binary and proves JSON/beacon delivery, sanitized stored rows, viewer access, cookie forgery/revocation, general-ingest isolation, Origin/tenant denial, body limits and RUM disable gates. The same regression is wired into Rust-quality CI via bash tests/run-frontend-telemetry.sh.

Deployment prerequisite for frontend runtime telemetry and matching Helm endpoint defaults. Existing root README files and public docs are unchanged.

@mzupan
mzupan changed the base branch from main to codex/export-stream-health November 15, 2026 22:30
@mzupan
mzupan added this pull request to stack #102 November 15, 2026 22:43
Base automatically changed from codex/export-stream-health to main November 15, 2026 22:48
@mzupan
mzupan merged commit 7665e30 into main Nov 15, 2026
6 checks passed
@mzupan
mzupan deleted the codex/frontend-session-telemetry branch November 15, 2026 23:01
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