Skip to content

docs(rfc): propose app usage metrics (installs, versions, sessions, run time) - #39107

Closed
chenmingwei23 wants to merge 1 commit into
mainfrom
docs/rfc-app-usage-metrics
Closed

chenmingwei23 wants to merge 1 commit into
mainfrom
docs/rfc-app-usage-metrics

Conversation

@chenmingwei23

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Record a draft design for app usage metrics, so app authors can later see how many machines install, update, remove and use each version of their app.

Today Crew sends one app metric, kirocrew.app.installed, counted on first install only and with no version (record_app_installed in src/kiro_crew/metrics/feature_usage.py). An app author cannot see which versions are in use, whether people update or uninstall, or whether anyone opens the app or runs its sessions.

Why it matters

Apps built on Kiro Crew now have real users, and their authors have no numbers to decide what to fix or ship next. Any new metric also changes what leaves the machine, so the labels, the consent notice and the data volume need agreeing before code lands.

Not a goal

  • Building any of it. This PR adds a document and an index row only.
  • Kiro Space's side (downloads, ratings, likes, its own active people).
  • Per-person, per-team or per-machine views, and private apps' names or versions.
  • Changing the consent gate itself.

What changed (motivation -> approach -> change)

  • Adds docs/request-for-change/rfc-app-usage-metrics.md, status draft. It proposes, per public app and version: installs, updates, uninstalls, a daily present count, opens, sessions started under the app, agent run time and foreground time. All are counters on kiro.crew with closed labels; durations use closed buckets, never histograms. New rows export only to people who acknowledged a new privacy notice (version 5). It also proposes retiring kirocrew.app.task.completed, and lists later waves (what an app carries, custom app counts) as designed but unscheduled.
  • Adds its row to the index in docs/request-for-change/README.md.
  • Code references were re-read on main at 5f20c7ae3a and cite symbols, not line numbers, as the docs lint requires.
  • Credits docs(rfc): propose app usage stats for app builders #18855 by FlorentLa in the Related list as prior work on installs, active installs and version history; this RFC borrows its small-count floor and version normalization ideas.

Backwards compatibility

Compatible: a new document and one index row; no code, config or schema changes.

Removes nothing: the diff only adds a document and an index row.

Tests

Proof: not provable -- docs or config only

python3 scripts/docs_lint.py on the head: "All documentation checks passed".

Manual verification

N/A -- docs only. Every cited symbol was checked to exist on main at 5f20c7ae3a.

Real-machine verification

N/A -- the diff is documentation and runs nothing.

Related Issues

Related: #18855 (prior draft RFC on app usage stats). No tracking issue yet; acceptance is requested from a maintainer.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title
  • Existing tests pass and new tests added for new functionality (docs only)
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributed under the project's Apache-2.0 license.

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 188631efb772effdeb7cb31de0fc823b1d5636a6 and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 188631e

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 188631efb772effdeb7cb31de0fc823b1d5636a6 false-positive: <reason, 20 to 500 characters>

@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 18, 2026
@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ⏭️ skipped

Revision 188631efb772effdeb7cb31de0fc823b1d5636a6 ships no reviewable capability (docs, tests or generated files only), so there is nothing to inventory. Does not block merge.

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ⏭️ skipped

Revision 188631efb772effdeb7cb31de0fc823b1d5636a6 touches no user-facing surface (no changes under website/ or committed screenshots), so the UX review was skipped. Does not block merge.

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 188631efb772effdeb7cb31de0fc823b1d5636a6 — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

This adds only a draft RFC and one index row; no code or contract changes, and nothing ships until a maintainer accepts it.

[DESIGN-REVIEWED] 188631e

Description read

[DESCRIPTION-READ] bea360d3a36f78ffd2c6551da0439eee1436197968dcc437e6ca6fd345b7d1ec

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 188631efb772effdeb7cb31de0fc823b1d5636a6 — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 188631e

Verdict parsed from the review's SHA-scoped output markers for commit 188631efb772effdeb7cb31de0fc823b1d5636a6.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 188631efb772effdeb7cb31de0fc823b1d5636a6 false-positive: <reason, 20 to 500 characters>

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Nov 18, 2026
@KiroCrewCaptain

Copy link
Copy Markdown
Collaborator

Code change approver recommendation: A person should decide

Why: the decider estimates a 6% chance that this change introduces a defect, within the 12% limit for approving on its own, but it changes 500 lines, more than the 400 it may approve on its own.

This PR adds one draft RFC and one index row. Neither changes code, config or schema. The code claims I checked hold on the head:

  • kiro_export.NOTICE_VERSION is 3 and beacon.PRIVACY_NOTICE_VERSION is 4.
  • kirocrew.app.task.completed exists and its only caller is Papyrus.
  • public_app_ids() counts only registry records with an empty sourceRegistry and dev off, plus the shipped built-ins.
  • owning_app carries the Trusted: comment in _get_or_create_impl.
  • BEHAVIORAL_SCOPE is kiro.crew.

Trust and consent:

  • The design never loosens the consent gate. Each new row needs notice version 5, on top of the existing floor of 3.
  • The new browser route is owner-only and has a size limit. The server works out the app's id and version itself, so the page cannot supply them.
  • Versions must match X.Y.Z exactly, so they cannot carry free text.
  • The RFC states the existing weakness that an app can write its own installed.json (store_origin.py already says so). The fix is planned as wave L2.
  • Labelling Kiro Space installs by their listing name is a reasoned choice, flagged as an open question the owner can revert, and it lands in a later PR.

None of this moves a trust

Tier: 2, held for a person: design-doc-gate: D.

An automated recommendation, not a review: a maintainer still decides. It approves on its own only when the estimated chance of a defect is at most 12% and the change has at most 400 changed lines. Decider v3c (217fe607) · commit d89b2696d1 · 500 changed lines. If this recommendation is wrong, reply here: replies are how the approver is evaluated.

@KiroCrewCaptain

Copy link
Copy Markdown
Collaborator

This adds a new concept, so it needs a design sign-off from a maintainer before it can merge. A maintainer will post the decision here.

To propose a design, follow the request-for-change process in CONTRIBUTING.md (docs/request-for-change/).

Review result: this PR changes two docs files and no code. PR Readiness passed on this head, and the review found no blocking issue. The review checked the RFC's code references against its audited commit 5f20c7ae3a. They hold, for example record_app_installed, count_first_install under if not was_installed, NOTICE_VERSION 3 and PRIVACY_NOTICE_VERSION 4, and the 21 built-ins. One thing done well: the consent design adds a per-row notice floor that never loosens the existing gate. The server also resolves the app id and version itself and never takes them from the page.

Optional notes for the design discussion:

@bolichen97

Copy link
Copy Markdown
Contributor

Review of d89b2696d1 (docs-only RFC). The core design reads well: every row is a closed-label counter on the existing kiro.crew scope, the app id and version are resolved server-side from what a store published, private apps stay private, recording never changes the measured call's outcome, and each new row needs notice version 5 (the per-row floor in §7). Retiring kirocrew.app.task.completed and the 65-series-per-version budget in §6.4 both look right.

Input before acceptance

  1. Open question 1 (Space ids) is the call that matters most, and it is a confidentiality question, not only privacy. Kiro Space listings are internal (the internal-beta store and team-scoped listings), while the export goes to telemetry.us-east-1.kiro.dev. space:<namespace>/<name> would send internal project and team names to that endpoint. Please name in §7 who owns that endpoint's data and whether internal listing names may land there. Unless that is confirmed, I'd default to the revert option you list ("only listings that passed review and that every verified internal user can see") or private, and keep the full id as a later opt-in.
  2. Shared Crew undercount. POST /api/telemetry/app-view is owner-only (require_owner_dashboard_request), so opened and foreground_time from a collaborator's or relay teammate's tab are dropped, while session_started and run_time count every person's sessions. §6.3's "daily active machines" and "average foreground time" then mix two populations. Either say so on the author board, or state that the denominator is owner views only.
  3. present runs on a gateway that may be up for days. "Once per installed app per UTC day ... 10 minutes after gateway start" reads as a start-time task. Please say it re-arms each UTC day for a long-running gateway (and that two gateway restarts in one day still send one row per app, or that the reader dedupes by machine and day).
  4. Open question 10 should be decided before PR 1, not alongside it. New keys at the collector (entity_version, keep_data, status, backend, surface, kind, duration) are a schema change on someone else's system. Name the owner of the collector's key list and get their privacy review on the whole set once.

Smaller: §6.4's fleet bound rests on "35 public apps and 20 versions each (an assumption)". Fine for a draft, but please replace it with the store's real count before acceptance, since the "Not checked" list already names it.

No blocking defect in the text.

A Kiro Crew team member must sign off on this design before it merges. This review does not approve it.

AI-assisted, sent by Bolin Review bot

@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Nov 19, 2026
@chenmingwei23
chenmingwei23 force-pushed the docs/rfc-app-usage-metrics branch from d89b269 to 90819ff Compare November 19, 2026 21:01
@github-actions github-actions Bot removed the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Nov 19, 2026
@chenmingwei23
chenmingwei23 force-pushed the docs/rfc-app-usage-metrics branch 2 times, most recently from c115aca to 9ecbe96 Compare November 19, 2026 22:26
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: passed Eligible automated validation passed for the current revision readiness: checking Automated validation is still running labels Nov 19, 2026
…un time)

Add rfc-app-usage-metrics.md (status draft) and its index row. It proposes
per-app, per-version installs, updates and uninstalls, plus sessions, agent
run time and foreground time under each app, as counters on closed labels
behind a per-row notice floor, and retires kirocrew.app.task.completed.

Code references were re-read on main at 5f20c7a and cite symbols, not
line numbers. Credits #18855 as prior work on installs, active installs and
version history.
@chenmingwei23
chenmingwei23 force-pushed the docs/rfc-app-usage-metrics branch from 9ecbe96 to 188631e Compare November 19, 2026 23:31
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: passed Eligible automated validation passed for the current revision labels Nov 19, 2026
@chenmingwei23

Copy link
Copy Markdown
Contributor Author

Closing this RFC. The first batch (kirocrew.app.installed and kirocrew.app.task.completed) is already on main via #38157 and #38347, so we will ship the rest as normal PRs instead of a separate design doc. The branch stays in place for reference, and the review points raised here (Space ids, Shared Crew undercount, the daily present row, and the collector key review) will be handled in those PRs. Thanks to everyone who reviewed.

chenmingwei23 added a commit that referenced this pull request Nov 20, 2026
Implements RFC section 11 PR 5 (app usage metrics, closed #39107):
emit_turn_duration gains owning_app, and both turn callers pass the live
provider's owning_app. Each finished turn of an app's session adds its wall
seconds, rounded up, with the bucket of that turn. A turn with no duration
adds nothing; a raising recorder leaves the turn metric unchanged.

Closes #39773
chenmingwei23 added a commit that referenced this pull request Nov 20, 2026
…p.present)

Implements RFC section 11 PR 6 (app usage metrics, closed #39107). A
gateway background task records one kirocrew.app.present row per
installed app per UTC day, labelled entity_version, status
(enabled/disabled/other) and backend (none/running/stopped/other).
The first pass waits 10 minutes; the task then re-checks hourly and
just after each UTC midnight, so a gateway that runs for days records
every day. The last recorded UTC day is stamped next to the beacon's
daily stamp, so restarts the same day record once. Nothing is recorded
and no stamp is written while the recorder is off.

Refs #39772
chenmingwei23 added a commit that referenced this pull request Nov 20, 2026
Implements RFC section 11 PR 5 (app usage metrics, closed #39107):
emit_turn_duration gains owning_app, and both turn callers pass the live
provider's owning_app. Each finished turn of an app's session adds its wall
seconds, rounded up, with the bucket of that turn. A turn with no duration
adds nothing; a raising recorder leaves the turn metric unchanged.

Closes #39773
chenmingwei23 added a commit that referenced this pull request Nov 20, 2026
…p.present)

Implements RFC section 11 PR 6 (app usage metrics, closed #39107). A
gateway background task records one kirocrew.app.present row per
installed app per UTC day, labelled entity_version, status
(enabled/disabled/other) and backend (none/running/stopped/other).
The first pass waits 10 minutes; the task then re-checks hourly and
just after each UTC midnight, so a gateway that runs for days records
every day. The last recorded UTC day is stamped next to the beacon's
daily stamp, so restarts the same day record once. Nothing is recorded
and no stamp is written while the recorder is off.

Refs #39772
chenmingwei23 added a commit that referenced this pull request Nov 20, 2026
…pp pages

Implements RFC section 11 PR 7 (app usage metrics, closed #39107): a new
owner-only POST /api/telemetry/app-view, copied from ui-control
(require_owner_dashboard_request, 256-byte bounded JSON body, 204), and two
counters on kiro.crew: kirocrew.app.opened{surface} and
kirocrew.app.foreground_time{surface,duration} (unit s). The server resolves
the public id and version from the app name itself; an unknown name is
private. The page sends one opened per mount and one span per visible
stretch (keepalive); spans under 1 s are not sent and the server cuts a span
to 24 h. Both count owner views only.
chenmingwei23 added a commit that referenced this pull request Nov 20, 2026
Implements RFC section 11 PR 5 (app usage metrics, closed #39107):
emit_turn_duration gains owning_app, and both turn callers pass the live
provider's owning_app. Each finished turn of an app's session adds its wall
seconds, rounded up, with the bucket of that turn. A turn with no duration
adds nothing; a raising recorder leaves the turn metric unchanged.

Closes #39773
chenmingwei23 added a commit that referenced this pull request Nov 20, 2026
…pp pages

Implements RFC section 11 PR 7 (app usage metrics, closed #39107): a new
owner-only POST /api/telemetry/app-view, copied from ui-control
(require_owner_dashboard_request, 256-byte bounded JSON body, 204), and two
counters on kiro.crew: kirocrew.app.opened{surface} and
kirocrew.app.foreground_time{surface,duration} (unit s). The server resolves
the public id and version from the app name itself; an unknown name is
private. The page sends one opened per mount and one span per visible
stretch (keepalive); spans under 1 s are not sent and the server cuts a span
to 24 h. Both count owner views only.
KiroCrewCaptain pushed a commit that referenced this pull request Nov 20, 2026
…#39777)

Implements RFC section 11 PR 4 (app usage metrics, closed #39107): right
after record_session_started counts kirocrew.session.started, a session
whose provider carries a trusted owning_app also counts
kirocrew.app.session_started with Entity = app_public_id, entity_version =
app_public_version and kind = the session_kind (9 values). No owning_app,
no count. A raising app recorder leaves session.started counted and the
session start unchanged.

Co-authored-by: Raymond Chen <chenmingwei23@users.noreply.github.com>
chenmingwei23 added a commit that referenced this pull request Nov 20, 2026
Implements RFC section 11 PR 5 (app usage metrics, closed #39107):
emit_turn_duration gains owning_app, and both turn callers pass the live
provider's owning_app. Each finished turn of an app's session adds its wall
seconds, rounded up, with the bucket of that turn. A turn with no duration
adds nothing; a raising recorder leaves the turn metric unchanged.

Closes #39773
chenmingwei23 added a commit that referenced this pull request Nov 20, 2026
…p.present)

Implements RFC section 11 PR 6 (app usage metrics, closed #39107). A
gateway background task records one kirocrew.app.present row per
installed app per UTC day, labelled entity_version, status
(enabled/disabled/other) and backend (none/running/stopped/other).
The first pass waits 10 minutes; the task then re-checks hourly and
just after each UTC midnight, so a gateway that runs for days records
every day. The last recorded UTC day is stamped next to the beacon's
daily stamp, so restarts the same day record once. Nothing is recorded
and no stamp is written while the recorder is off.

Refs #39772
chenmingwei23 added a commit that referenced this pull request Nov 20, 2026
…pp pages

Implements RFC section 11 PR 7 (app usage metrics, closed #39107): a new
owner-only POST /api/telemetry/app-view, copied from ui-control
(require_owner_dashboard_request, 256-byte bounded JSON body, 204), and two
counters on kiro.crew: kirocrew.app.opened{surface} and
kirocrew.app.foreground_time{surface,duration} (unit s). The server resolves
the public id and version from the app name itself; an unknown name is
private. The page sends one opened per mount and one span per visible
stretch (keepalive); spans under 1 s are not sent and the server cuts a span
to 24 h. Both count owner views only.
chenmingwei23 added a commit that referenced this pull request Nov 20, 2026
…pp pages

Implements RFC section 11 PR 7 (app usage metrics, closed #39107): a new
owner-only POST /api/telemetry/app-view, copied from ui-control
(require_owner_dashboard_request, 256-byte bounded JSON body, 204), and two
counters on kiro.crew: kirocrew.app.opened{surface} and
kirocrew.app.foreground_time{surface,duration} (unit s). The server resolves
the public id and version from the app name itself; an unknown name is
private. The page sends one opened per mount and one span per visible
stretch (keepalive); spans under 1 s are not sent and the server cuts a span
to 24 h. Both count owner views only.
chenmingwei23 added a commit that referenced this pull request Nov 20, 2026
…pp pages

Implements RFC section 11 PR 7 (app usage metrics, closed #39107): a new
owner-only POST /api/telemetry/app-view, copied from ui-control
(require_owner_dashboard_request, 256-byte bounded JSON body, 204), and two
counters on kiro.crew: kirocrew.app.opened{surface} and
kirocrew.app.foreground_time{surface,duration} (unit s). The server resolves
the public id and version from the app name itself; an unknown name is
private. The page sends one opened per mount and one span per visible
stretch (keepalive); spans under 1 s are not sent and the server cuts a span
to 24 h. Both count owner views only.
KiroCrewCaptain pushed a commit that referenced this pull request Nov 20, 2026
…39784)

Implements RFC section 11 PR 5 (app usage metrics, closed #39107):
emit_turn_duration gains owning_app, and both turn callers pass the live
provider's owning_app. Each finished turn of an app's session adds its wall
seconds, rounded up, with the bucket of that turn. A turn with no duration
adds nothing; a raising recorder leaves the turn metric unchanged.

Closes #39773

Co-authored-by: Raymond Chen <chenmingwei23@users.noreply.github.com>
chenmingwei23 added a commit that referenced this pull request Nov 20, 2026
…p.present)

Implements RFC section 11 PR 6 (app usage metrics, closed #39107). A
gateway background task records one kirocrew.app.present row per
installed app per UTC day, labelled entity_version, status
(enabled/disabled/other) and backend (none/running/stopped/other).
The first pass waits 10 minutes; the task then re-checks hourly and
just after each UTC midnight, so a gateway that runs for days records
every day. The last recorded UTC day is stamped next to the beacon's
daily stamp, so restarts the same day record once. Nothing is recorded
and no stamp is written while the recorder is off.

Refs #39772
chenmingwei23 added a commit that referenced this pull request Nov 20, 2026
…pp pages

Implements RFC section 11 PR 7 (app usage metrics, closed #39107): a new
owner-only POST /api/telemetry/app-view, copied from ui-control
(require_owner_dashboard_request, 256-byte bounded JSON body, 204), and two
counters on kiro.crew: kirocrew.app.opened{surface} and
kirocrew.app.foreground_time{surface,duration} (unit s). The server resolves
the public id and version from the app name itself; an unknown name is
private. The page sends one opened per mount and one span per visible
stretch (keepalive); spans under 1 s are not sent and the server cuts a span
to 24 h. Both count owner views only.
chenmingwei23 added a commit that referenced this pull request Nov 20, 2026
…pp pages

Implements RFC section 11 PR 7 (app usage metrics, closed #39107): a new
owner-only POST /api/telemetry/app-view, copied from ui-control
(require_owner_dashboard_request, 256-byte bounded JSON body, 204), and two
counters on kiro.crew: kirocrew.app.opened{surface} and
kirocrew.app.foreground_time{surface,duration} (unit s). The server resolves
the public id and version from the app name itself; an unknown name is
private. The page sends one opened per mount and one span per visible
stretch (keepalive); spans under 1 s are not sent and the server cuts a span
to 24 h. Both count owner views only.
chenmingwei23 added a commit that referenced this pull request Nov 20, 2026
…p.present)

Implements RFC section 11 PR 6 (app usage metrics, closed #39107). A
gateway background task records one kirocrew.app.present row per
installed app per UTC day, labelled entity_version, status
(enabled/disabled/other) and backend (none/running/stopped/other).
The first pass waits 10 minutes; the task then re-checks hourly and
just after each UTC midnight, so a gateway that runs for days records
every day. The last recorded UTC day is stamped next to the beacon's
daily stamp, so restarts the same day record once. Nothing is recorded
and no stamp is written while the recorder is off.

Refs #39772
chenmingwei23 added a commit that referenced this pull request Nov 20, 2026
…pp pages

Implements RFC section 11 PR 7 (app usage metrics, closed #39107): a new
owner-only POST /api/telemetry/app-view, copied from ui-control
(require_owner_dashboard_request, 256-byte bounded JSON body, 204), and two
counters on kiro.crew: kirocrew.app.opened{surface} and
kirocrew.app.foreground_time{surface,duration} (unit s). The server resolves
the public id and version from the app name itself; an unknown name is
private. The page sends one opened per mount and one span per visible
stretch (keepalive); spans under 1 s are not sent and the server cuts a span
to 24 h. Both count owner views only.
KiroCrewCaptain pushed a commit that referenced this pull request Nov 20, 2026
…p.present) (#39783)

Implements RFC section 11 PR 6 (app usage metrics, closed #39107). A
gateway background task records one kirocrew.app.present row per
installed app per UTC day, labelled entity_version, status
(enabled/disabled/other) and backend (none/running/stopped/other).
The first pass waits 10 minutes; the task then re-checks hourly and
just after each UTC midnight, so a gateway that runs for days records
every day. The last recorded UTC day is stamped next to the beacon's
daily stamp, so restarts the same day record once. Nothing is recorded
and no stamp is written while the recorder is off.

Refs #39772

Co-authored-by: Raymond Chen <chenmingwei23@users.noreply.github.com>
chenmingwei23 added a commit that referenced this pull request Nov 20, 2026
…pp pages

Implements RFC section 11 PR 7 (app usage metrics, closed #39107): a new
owner-only POST /api/telemetry/app-view, copied from ui-control
(require_owner_dashboard_request, 256-byte bounded JSON body, 204), and two
counters on kiro.crew: kirocrew.app.opened{surface} and
kirocrew.app.foreground_time{surface,duration} (unit s). The server resolves
the public id and version from the app name itself; an unknown name is
private. The page sends one opened per mount and one span per visible
stretch (keepalive); spans under 1 s are not sent and the server cuts a span
to 24 h. Both count owner views only.
KiroCrewCaptain pushed a commit that referenced this pull request Nov 20, 2026
…pp pages (#39793)

Implements RFC section 11 PR 7 (app usage metrics, closed #39107): a new
owner-only POST /api/telemetry/app-view, copied from ui-control
(require_owner_dashboard_request, 256-byte bounded JSON body, 204), and two
counters on kiro.crew: kirocrew.app.opened{surface} and
kirocrew.app.foreground_time{surface,duration} (unit s). The server resolves
the public id and version from the app name itself; an unknown name is
private. The page sends one opened per mount and one span per visible
stretch (keepalive); spans under 1 s are not sent and the server cuts a span
to 24 h. Both count owner views only.

Co-authored-by: Raymond Chen <chenmingwei23@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants