Repository navigation
Add opt-in product telemetry for the console - #1197
Merged
Merged
Conversation
Off by default. With --telemetry-url and --telemetry-website-id the portal reports route names, route patterns and clicks on data-track elements to the hub, which relays them to an operator-run Umami. Without the flags the hub registers no route, /healthz reports telemetry false and the portal records and sends nothing. The portal never sends a raw URL, page text or an identity, and the hub discards events outside that shape. docs/telemetry.md is the contract.
Contributor
Author
|
/retest |
Contributor
Author
|
/approve |
Contributor
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mjudeikis The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
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.
What
Opt-in product telemetry for the console: which pages are opened and which marked controls are clicked, reported to an analytics backend the operator runs (Umami). Off by default.
Without
--telemetry-urlthe hub registers no telemetry route,/healthzanswers"telemetry": false, and the portal records, stores and sends nothing. There is no built-in destination; Railgrid itself never phones home.How
pkg/hub/telemetry): a relay behind the user-only middleware, so it is not an open proxy. It validates each event, answers 204 at once and delivers from a bounded queue that drops when the backend is slow. Umami is oneSinkimplementation; nothing else knows about it.--telemetry-url+--telemetry-website-id(hub.telemetry.url/hub.telemetry.websiteID). Setting one without the other fails at startup and athelm template.portal/src/telemetry): page views fromrouter.afterEach, clicks from a document listener on[data-track]. The CSP is unchanged (connect-src 'self'). Provider UIs render in the same document, sodata-trackworks inside them with no provider code.docs/telemetry.mdis the contract for what may be sent.What is sent, and what is not
Sent: route name, route pattern (
/:orgID/:workspaceID/mcp/:name), event name anddata-track-*labels, arrival origin on the first page, screen size and language.Never sent: the address bar, page titles or text, form values, user/org/workspace identity, the path inside a provider page, or the name of an organization's own provider (reported as
org-provider). The hub enforces the shape too: a route with a query string, an unknown type or an oversized field is discarded there.The hub passes the browser's IP and user agent to Umami, which hashes them into an anonymous session ID. Reporting under the same website ID as the marketing site therefore joins a visitor's site session to their console session without any identifier passing between the two. The doc states that consent is the operator's responsibility.
Tagged so far
create_workspaceandenable_provider(the submit buttons; a click is the attempt, not the outcome). Everything else is page views until moredata-trackattributes are added.Checked
go test ./pkg/hub/telemetry/ ./pkg/hub/,make lint,make verify-boilerplate.vue-tsc -b,npm test(746 pass, 10 new for the tracker).helm template: off renders no telemetry args; on renders both; half-configured and anextraArgsduplicate both fail.Not checked: a live hub. Route registration, the
/healthzfield and the portal-to-hub request have not been exercised end to end.