Skip to content

Expose per-app session counts in deployment stats, Prometheus, and the UI #27411

Closed

Description

@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 publish the additive per-app shape alongside deprecated legacy outputs. The completion RFC leaves removal timing and policy TBD; one compatibility release does not automatically authorize removal:

  • codersdk.SessionCountDeploymentStats: expose the apps map with normalized app names, counts, family, display name, and icon; keep the existing vscode/jetbrains/ssh/reconnecting_pty fields populated by family until removal is separately approved
  • Prometheus: one session count gauge labeled by both app_name and family alongside the four coderd_agentstats_session_count_* gauges, preserving per-app visibility and supporting family aggregation; the old gauges remain deprecated and keep publishing until the removal policy/release is separately approved
  • 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
  • Extend the existing app registry in codersdk/appname.go (appNameFamilies, NormalizeAppName, and AppNameFamily) with display-name metadata (e.g. vscode → "VS Code") so the UI does not hardcode labels; unrecognized names fall back to the normalized raw identifier. This registry supersedes the earlier coderd/idemetadata design; do not introduce a separate registry.

Done when

  • apps map in the deployment stats API, legacy fields still populated by family
  • Labeled gauge exported; legacy gauges deprecated in docs, with removal timing left TBD until approved
  • Telemetry map field lands with ingestion sign-off
  • Deployment banner shows a new app name (e.g. cursor) without further frontend changes
  • Follow-up CLIENT-980 tracks eventual legacy removal under a separately agreed policy

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.

Description updated by Coder Agents on behalf of @EhabY: corrected the registry location and recorded the agreed Prometheus label dimensions.

Compatibility policy corrected against the Completing Scalable IDE Session Tracking RFC by Coder Agents on behalf of @EhabY. The issue remains Done; this does not reopen completed work.

Activity

  1. added theissue type on Jul 22, 2026
  2. linear-code commented on Jul 22, 2026

    @linear-code
  3. changed the title [-]Expose per-app session counts in deployment stats, Prometheus, and the UI (IDE session types phase 2)[/-] [+]Expose per-app session counts in deployment stats, Prometheus, and the UI[/+] on Jul 22, 2026
  4. assigned and unassigned on Sep 21, 2026
  5. added a commit that references this issue on Sep 24, 2026
    bacb4fc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions