Repository navigation
Accept restricted frontend health telemetry using browser sessions - #100
Merged
Merged
Conversation
…etrics-integration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/telemetrycontract 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 asrush-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 viabash 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.