Title: Export per-app usage time per template to Prometheus · Issue #29940 · coder/coder · GitHub
Open Graph Title: Export per-app usage time per template to Prometheus · Issue #29940 · coder/coder
X Title: Export per-app usage time per template to Prometheus · Issue #29940 · coder/coder
Description: 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 opt-in (CODER_PROMETHEUS_COLLECT_AGENT_STATS) and counts sessions, not time. The template insight...
Open Graph Description: 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 opt-in (CODER_PROMETHEUS_COLLECT_AGENT_STATS) and counts ...
X Description: 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 opt-in (CODER_PROMETHEUS_COLLECT_AGENT_STATS) and counts ...
Opengraph URL: https://github.com/coder/coder/issues/29940
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Export per-app usage time per template to Prometheus","articleBody":"Prometheus has no per-app usage time per template, such as Cursor versus VS Code.\n\n* `coderd_agentstats_session_count{app_name}` is per app, but opt-in (`CODER_PROMETHEUS_COLLECT_AGENT_STATS`) and counts sessions, not time.\n* The template insights API and UI have per-app time since coder/coder#29796, but Prometheus does not.\n\n## Resolution\n\ncoder/coder#29906 (with [CLIENT-1036](https://linear.app/codercom/issue/CLIENT-1036/label-the-vs-code-family-and-report-built-in-app-usage-per-app)) delivers this.\n\n**Not approved yet.** Per-app built-in series are part of the [RFC](\u003chttps://app.notion.com/p/3e9d579be5928178b37ce324b8ba0c8b>) amendment, which must be approved before coder/coder#29906 merges. The approved RFC specifies a family metric.\n\n`coderd_insights_applications_usage_seconds{template_name, display_name, slug, connection_method, organization_name}`\n\n* Template apps: `connection_method=\"workspace_app\"`.\n* 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.\n\nChanges from the original proposal:\n\n* **Same metric, not a new one.** `connection_method` separates built-in from template apps.\n* **No family label or family metric.**\n* `application_name` **renamed to** `display_name`, so old selectors fail visibly.\n* **Series limit of the template insights API**, not everything unregistered under `unknown`.\n* **Breaking, not additive.** The docs map old series to new ones.\n* **No deduplicated total.** A family sum counts overlapping minutes twice; dogfood showed no such overlap in 100,567 connection logs.\n* **Query** groups by app name, no grouping sets: 398.5 ms versus 403.7 ms on `main` with 20,000 agents.\n\n## Done when\n\n- [ ] The RFC amendment is approved.\n- [ ] coder/coder#29906 is merged.\n\nRefs [coder/coder#29940](\u003chttps://github.com/coder/coder/issues/29940>), coder/coder#30497, coder/coder#29796.\n\n---\n\nUpdated by Coder Agents on behalf of @EhabY.","author":{"url":"https://github.com/EhabY","@type":"Person","name":"EhabY"},"datePublished":"2026-09-25T17:38:14Z","url":"https://github.com/coder/coder/issues/29940"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:69d62e67-9f41-26d3-1bcc-8d2b73c4f216 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9E68:1DCB8C:1A46DB8:22A6C87:6B014705 |
| html-safe-nonce | 048129c84d1bfbcb7689a4f03211541ddc9bf5d354429198e5ce650e83049d93 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RTY4OjFEQ0I4QzoxQTQ2REI4OjIyQTZDODc6NkIwMTQ3MDUiLCJ2aXNpdG9yX2lkIjoiNjU3MDU5NjEwMTEzOTgxMDA1MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 25c57265dd1c06aad76819b2667a5ebddbed69c35b55594696d88dcbb2afc335 |
| hovercard-subject-tag | issue:5586296901 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/coder/coder/29940/issue_layout |
| twitter:image | https://opengraph.githubassets.com/cd34662966780b4bdf9777be25c224314cdb2dfb2eb17d0d449d8ed61b5d6794/coder/coder/issues/29940 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/cd34662966780b4bdf9777be25c224314cdb2dfb2eb17d0d449d8ed61b5d6794/coder/coder/issues/29940 |
| og:image:alt | 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 opt-in (CODER_PROMETHEUS_COLLECT_AGENT_STATS) and counts ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | EhabY |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/coder/coder git https://github.com/coder/coder.git |
| octolytics-dimension-user_id | 95932066 |
| octolytics-dimension-user_login | coder |
| octolytics-dimension-repository_id | 440752086 |
| octolytics-dimension-repository_nwo | coder/coder |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 440752086 |
| octolytics-dimension-repository_network_root_nwo | coder/coder |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width