Skip to content

Report the onboarding journey, hub-confirmed outcomes and provider flows in telemetry - #1199

Merged
railgrid-prow[bot] merged 1 commit into
railgrid:mainfrom
mjudeikis:console-journey-telemetry
Nov 20, 2026
Merged

railgrid-prow[bot] merged 1 commit into
railgrid:mainfrom
mjudeikis:console-journey-telemetry

Conversation

@mjudeikis

Copy link
Copy Markdown
Contributor

Follow-up to #1197. The console telemetry so far reports page views and a few clicks; this makes each flow a funnel, so it shows where users stop. Telemetry stays opt-in and off by default.

What changes

  • Portal journey events. Onboarding, checkout, the getting-started guide, workspace and organization creation and provider enable now report steps and outcomes. A failure is named by a fixed stage / reason / HTTP status label, never by the error message.
  • Outcomes the hub confirms. The hub records organization_created, workspace_created and provider_enabled when the operation succeeds, under the caller's browser address so they join the same session. They also fire for the CLI and the API. The browser no longer reports these successes, only failures.
  • Sign-in page. New POST /api/telemetry/public takes no credentials and accepts exactly the login and auth-callback page views and the sign_in click (method: oidc | token). Batch capped at 4 events / 2 KiB, rate-limited per address (burst 30, one per 2s); over the limit answers the same 204 and records nothing. Registered only when telemetry is enabled.
  • Provider UIs. The host passes track on railgridContext; portalkit/telemetry.ts exposes providerTrack(ctx). Edges, agents and app-studio report their main flows (connect an edge, connect a model, create an agent or project, chat and runs, preview, deploy, sharing). The host stamps provider: <name> and a bundle cannot override it.
  • Organizations' own providers report nothing. Clicks inside a non-platform provider element are dropped and its track is a no-op.
  • Navigation inside a provider is one page view, not one per route change.

docs/telemetry.md lists every event and label.

Privacy

Every label value comes from a closed set defined in code: no resource names, prompts, model IDs or error text. Two labels rely on lists that are fixed today: edges' service type (bundled catalog) and agents' connection type (hardcoded list).

Testing

  • make fix-lint, make lint; go test ./pkg/hub/restapi/ ./pkg/hub/telemetry/
  • portal: vue-tsc -b, npm run build, npm test (750 pass)
  • edges (205 pass) and agents (1445 pass) portal tests, type check and build
  • app-studio: type check and build pass; 862 pass, 1 fails (src/ProjectHistory.test.mjs, a file and component this PR does not touch)
  • make verify-portalkit, verify-ui-conformance, verify-design-docs, verify-provider-contract

Not exercised against a running hub or in a browser yet.

Rollout

Provider events appear only once the edges, agents and app-studio images are rebuilt and deployed, not with the hub alone.

@mjudeikis
mjudeikis requested a review from cwilhit as a code owner November 19, 2026 15:11

@mjudeikis mjudeikis left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@railgrid-prow

railgrid-prow Bot commented Nov 19, 2026

Copy link
Copy Markdown
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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Extend the opt-in console telemetry so a flow reads as a funnel:

- Portal: outcome and step events for onboarding, checkout, the
  getting-started guide, workspace, organization and provider enable,
  each failure named by a fixed stage or reason label, never the message.
- Hub: record organization_created, workspace_created and
  provider_enabled when the operation succeeds, so they also cover the
  CLI and the API. The browser keeps reporting failures only.
- Sign-in page: POST /api/telemetry/public takes no credentials, accepts
  only the login and auth-callback page views and the sign_in click, and
  is rate-limited per address.
- Providers: railgridContext.track plus portalkit providerTrack, with
  markers in edges, agents and app-studio. Events from an organization's
  own provider are dropped by the host.

docs/telemetry.md lists every event and label.
@mjudeikis
mjudeikis force-pushed the console-journey-telemetry branch from 6cfd170 to 92dc872 Compare November 19, 2026 16:21
@mjudeikis

Copy link
Copy Markdown
Contributor Author

/retest

2 similar comments
@mjudeikis

Copy link
Copy Markdown
Contributor Author

/retest

@mjudeikis

Copy link
Copy Markdown
Contributor Author

/retest

@railgrid-prow
railgrid-prow Bot merged commit c72dfdf into railgrid:main Nov 20, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant