Skip to content

Export per-app usage time per template to Prometheus #29940

Closed

Description

@EhabY

Prometheus has no per-app usage time per template, such as Cursor versus VS Code.

Resolution

#29906 (with CLIENT-1036) delivers this.

Not approved yet. Per-app built-in series are part of the RFC amendment, which must be approved before #29906 merges. The approved RFC specifies a family metric.

coderd_insights_applications_usage_seconds{template_name, display_name, slug, connection_method, organization_name}

  • Template apps: connection_method="workspace_app".
  • Built-in apps: connection_method is ssh, reconnecting_pty, or port_forwarding; slug is the app name (cursor, goland, ...); display_name is the registry name.

Changes from the original proposal:

  • Same metric, not a new one. connection_method separates built-in from template apps.
  • No family label or family metric.
  • application_name renamed to display_name, so old selectors fail visibly.
  • Series limit of the template insights API, not everything unregistered under unknown.
  • Breaking, not additive. The docs map old series to new ones.
  • No deduplicated total. A family sum counts overlapping minutes twice; dogfood showed no such overlap in 100,567 connection logs.
  • Query groups by app name, no grouping sets: 398.5 ms versus 403.7 ms on main with 20,000 agents.

Done when

Refs coder/coder#29940, #30497, #29796.


Updated by Coder Agents on behalf of @EhabY.

Activity

  1. linear-code commented on Sep 25, 2026

    @linear-code
  2. added
    observabilityIssues related to observability (metrics, dashboards, alerts, opentelemetry)
    on Sep 25, 2026
  3. self-assigned this
    on Sep 25, 2026
  4. added 14 commits that reference this issue on Oct 19, 2026
    128abb6
    5ba96c1
    a9566cd
    ab641f7
    b7532cb
    d624989
    29b993d
    0f7ce6f
    836ed21
    8cbb572
    fc69da5
    7bb81d4
    54fc9da
    5f9b573
  5. added a commit that references this issue on Oct 27, 2026
    2819221
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

featureobservabilityIssues related to observability (metrics, dashboards, alerts, opentelemetry)vs-code

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions