Repository navigation
feat: add client_connected telemetry and surface/client labels for the IDE funnel - #1528
Draft
anandgupta42 wants to merge 1 commit into
Draft
anandgupta42 wants to merge 1 commit into
anandgupta42 wants to merge 1 commit into
Conversation
…e IDE funnel Make the serve-process (IDE extension) onboarding funnel measurable. Telemetry showed ~92% of installs run the VS Code extension (source "datamates") as an `altimate serve` backend, and the launch->session drop there was invisible: the serve process emitted `startup_ready` then nothing until `session_start`. - `startup_ready` now carries `surface` and `client` (`ALTIMATE_CLI_CLIENT`, e.g. "datamates") as queryable properties. The surface label was previously only on `command`, and there was no client dimension at all. - New `client_connected` event: fires once per process on the first authenticated subscription to the event stream (`GET /event` / `/global/event`) in `Server.createApp`. Splits "backend launched but no client ever connected" from "connected but never sent a message". Added to `ANCHOR_EVENTS` so it flushes immediately (a short-lived extension host can die before the 5s interval). Telemetry-only, fail-safe and non-blocking. The server.ts hook is wrapped in `altimate_change` markers (upstream-shared file); the telemetry module is altimate-owned under src/altimate/**. Tests: first-run-health.test.ts covers the new fields and once-per-process emit. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This branch has not been deployed
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.
Issue for this PR
Closes #
Type of change
What does this PR do?
Makes the IDE-extension onboarding funnel measurable from backend telemetry.
Context: ~92% of installs run the VS Code extension (telemetry
source="datamates"), which runsaltimate serveas its backend. On that process we emitstartup_readyand then nothing untilsession_start(the first model prompt), so the large launch -> first-message drop was invisible.Two additions:
startup_readygainssurfaceandclient.clientisALTIMATE_CLI_CLIENT(e.g.datamates), which the event didn't carry before;surfaceis the explicit analytics name mirroring the existingcommandfield.client_connectedevent. Emitted once per process the first time an authenticated client subscribes to the event stream (GET /eventor/global/event). It lives in a.usemiddleware after basic-auth inServer.createApp, so unauthenticated probes/health checks don't count. This splits the launch->session drop into "backend launched but no client connected" vs "connected but no message sent". Added toANCHOR_EVENTSso it flushes immediately.Telemetry-only, fail-safe (dynamic import +
.catch), non-blocking. Theserver.tschange is wrapped inaltimate_changemarkers (upstream-shared file); the telemetry module is undersrc/altimate/**(altimate-owned, no markers required).How did you verify your code works?
bun test test/altimate/telemetry/first-run-health.test.tsplus the telemetry suite: 371 pass, 0 fail. New tests assertstartup_readycarriessurface+clientand thatclient_connectedfires exactly once across repeated calls. Typecheck clean on the changed telemetry module. Marker placement checked by hand againstscript/upstream/utils/config.ts(the--markersguard currently no-ops against the v2 upstream baseline).Screenshots / recordings
N/A (backend telemetry only).
Checklist
Summary by cubic
Makes the IDE extension onboarding funnel measurable: the
altimate servebackend used by the VS Code extension previously went silent afterstartup_readyuntil the firstsession_start, hiding the launch→first-message drop.startup_readynow carriessurfaceandclient(fromALTIMATE_CLI_CLIENT, e.g.datamates); onlycommandwas recorded before.client_connectedevent fires once per process on the first authenticatedGET /eventor/global/eventsubscription, splitting "backend launched but no client connected" from "connected but no message sent".ANCHOR_EVENTSsince a short-lived extension host may die before the flush interval.Telemetry-only and fail-safe: the server hook is a dynamic import with
.catch, and theserver.tschange is wrapped inaltimate_changemarkers because it's an upstream-shared file.Written for commit 6b08c14. Summary will update on new commits.