Phase 2 of the Scalable Approach for Adding New IDE Session Types RFC. Phase 1 (#27410) stores per-app session counts internally but keeps all external surfaces unchanged; this phase exposes the dynamic counts so admins can see Cursor vs VS Code vs anything else.
Externally visible surfaces dual-publish for one release, then the legacy shape is removed (RFC: "API and metrics compatibility windows"):
codersdk.SessionCountDeploymentStats: add a session_counts map field with the full normalized names; keep the existing vscode/jetbrains/ssh/reconnecting_pty fields populated (aggregated by family) for one more release
- Prometheus: one family-labeled session count gauge alongside the four
coderd_agentstats_session_count_* gauges; the old gauges keep publishing for one release, marked deprecated in the Prometheus docs, then removed
- Telemetry snapshot: add a map field next to the legacy
SessionCount* fields; removal of the legacy fields must be coordinated with the telemetry ingestion owners
- Deployment banner (
DeploymentBannerView.tsx): render the map dynamically instead of the four hardcoded entries
coderd/idemetadata gains display-name metadata (e.g. vscode → "VS Code") so the UI does not hardcode labels; unrecognized names fall back to the raw identifier
Done when
Depends on #27410. The count queries already return per-app session_counts JSONB and fold into families in Go (#29109), so this is API/metrics/UI projection work with no SQL changes.
🤖 Created by Coder Agents on behalf of @EhabY.
Phase 2 of the Scalable Approach for Adding New IDE Session Types RFC. Phase 1 (#27410) stores per-app session counts internally but keeps all external surfaces unchanged; this phase exposes the dynamic counts so admins can see Cursor vs VS Code vs anything else.
Externally visible surfaces dual-publish for one release, then the legacy shape is removed (RFC: "API and metrics compatibility windows"):
codersdk.SessionCountDeploymentStats: add asession_countsmap field with the full normalized names; keep the existingvscode/jetbrains/ssh/reconnecting_ptyfields populated (aggregated by family) for one more releasecoderd_agentstats_session_count_*gauges; the old gauges keep publishing for one release, marked deprecated in the Prometheus docs, then removedSessionCount*fields; removal of the legacy fields must be coordinated with the telemetry ingestion ownersDeploymentBannerView.tsx): render the map dynamically instead of the four hardcoded entriescoderd/idemetadatagains display-name metadata (e.g.vscode→ "VS Code") so the UI does not hardcode labels; unrecognized names fall back to the raw identifierDone when
session_countsmap in the deployment stats API, legacy fields still populated by familycursor) without further frontend changesDepends on #27410. The count queries already return per-app
session_countsJSONB and fold into families in Go (#29109), so this is API/metrics/UI projection work with no SQL changes.🤖 Created by Coder Agents on behalf of @EhabY.