coderd_insights_applications_usage_seconds reports built-in apps as family totals (VS Code Family, JetBrains, SSH, Web Terminal), so Prometheus has no per-app usage time per template, such as Cursor versus VS Code. coderd_agentstats_session_count{app_name} is per app, but it is opt-in (CODER_PROMETHEUS_COLLECT_AGENT_STATS) and counts open sessions, not time.
The insights collector already has per-app seconds (SessionAppUsageSeconds) and sums them with codersdk.SumByFamily before export.
Proposal: a separate metric, such as coderd_insights_session_apps_usage_seconds{template_name, organization_name, family, app_name}. Clients choose app names, so it should label only registered apps and total the rest under unknown.
Refs #27412
coderd_insights_applications_usage_secondsreports built-in apps as family totals (VS Code Family, JetBrains, SSH, Web Terminal), so Prometheus has no per-app usage time per template, such as Cursor versus VS Code.coderd_agentstats_session_count{app_name}is per app, but it is opt-in (CODER_PROMETHEUS_COLLECT_AGENT_STATS) and counts open sessions, not time.The insights collector already has per-app seconds (
SessionAppUsageSeconds) and sums them withcodersdk.SumByFamilybefore export.Proposal: a separate metric, such as
coderd_insights_session_apps_usage_seconds{template_name, organization_name, family, app_name}. Clients choose app names, so it should label only registered apps and total the rest underunknown.Refs #27412