Repository navigation
feat(metrics): send product metrics from non-default data homes too - #37460
Conversation
The built-in kiro-telemetry destination was hidden under a non-default KIROCREW_HOME (a dev home, a pod, a worktree preview), the same hosts the daily heartbeat does not count. Those installs are people using the product, so the destination is now returned there by the same rules as any other home. kiro_export.destinations() drops only the is_default_home() check. The LTS, CI and test-suite gates stay, and so does every consent gate: recording on, the version 3 notice shown, every off switch, the policy otlp_hosts list. No IP is read or sent. The heartbeat keeps its own default-home rule. README, the export guide, metrics.md and the crew-log telemetry RFC say the same.
UX Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks. The owner decided to count dev machines, every consent gate is unchanged, and the removed Notes
[DESIGN-REVIEWED] 7220ec4 Description read[DESCRIPTION-READ] 0ed306f9d5c474033f42bd1e35295bb54f5d6e49bfd8e1171fce3f880648f1dc 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 |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS The default egress change rests on an owner decision of 2026-11-15 that only the description asserts. The base RFC behind the Kiro telemetry destination is Notes
What this change shipsInventory (5 items) — 3 justifiedIntent: let people running under their own data home have their product usage counted, under the existing consent rules. This is an ADDITION: a changed default.
[FIRST-PRINCIPLES-REVIEWED] 7220ec4 Description read[DESCRIPTION-READ] 08ffd81cfcc064fc84d3856a334bd185d8ea9f7ba120c165c6a61ec0622e127b That sha256 names the PR description this verdict read. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Code change approver recommendation: ApproveWhy: the decider estimates a 10% chance that this change introduces a defect, within the 12% limit for approving on its own, and every check passes. The PR drops the one 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 |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Approved. On head 7220ec4, the review traced every caller of kiro_export.destinations(). These are the provider listing, the CLI notice text, kirocrew telemetry status and enable, and the Privacy chapter hold-back in dashboard/handlers/core.py. They all read the one function, so they change together. notice_shown(), outbound_consented, the off switches and the otlp_hosts policy are unchanged, so nothing is sent before a notice that names the destination has been acknowledged. The test-suite floor (_suppressed_for_tests), the LTS and CI exclusions, and the heartbeat's own default-home rule all still hold. PR Readiness is green on this head.
Done well: the home fixture no longer pretends the home is the default one. So the whole existing consent, notice and loopback wire suite now runs on the new path, and the new test checks its own precondition first.
The design is signed off under the standing maintainer sign-off for changes by team members.
Optional:
- The Backwards compatibility section says "Nothing else changes". But an install under a non-default home that acknowledged the version 3 chapter will see the Privacy chapter once more, and a headless start prints the Kiro line once, before anything is sent (
core.py:566,metrics/notice.py:109). That is the correct consent behaviour. One line in that section would tell readers about it. test/metrics/test_kiro_export_destination.py:12still says non-default homes do not list the destination. Line 105 still describes the old rule as current.- The RFC export paragraph still files this change under the 2026-11-14 decision. Naming the 2026-11-15 decision there, with a link to where it is recorded, would help future readers.
…f-form offer (#37460, #37463, #37545) Backport to release/0.13.0 of three main commits, picked with git cherry-pick -x in main's merge order and squashed into one commit. They follow up #37183, which #37471 already put on 0.13: - #37460 (2a679d6): the built-in kiro-telemetry destination is also returned under a non-default KIROCREW_HOME. kiro_export.destinations() drops only the is_default_home() check; the LTS, CI and test-suite gates and every consent gate stay. The heartbeat keeps its own default-home rule. - #37463 (8de422d): installs that are off only because an older build wrote telemetry.enabled: false into their config are shown the Privacy chapter once, in an off form that names Kiro telemetry, with Turn on performance metrics / Keep off. kiro_export.off_offer_due decides that case; Keep off records only the notice version so it is not asked again. - #37545 (09b0ddc): test only. The TestOffOffer tests fake the default data home, since the offer is asked only there and the test home is a private KIROCREW_HOME. All three picks applied without conflicts; each backported patch is identical to its main commit (git range-diff shows no change). (cherry picked from commit 2a679d6) (cherry picked from commit 8de422d) (cherry picked from commit 09b0ddc) Co-authored-by: Raymond Chen <chenmingwei23@users.noreply.github.com>
…f-form offer (#37460, #37463, #37545) Backport to release/0.13.0 of three main commits, picked with git cherry-pick -x in main's merge order and squashed into one commit. They follow up #37183, which #37471 already put on 0.13: - #37460 (2a679d6): the built-in kiro-telemetry destination is also returned under a non-default KIROCREW_HOME. kiro_export.destinations() drops only the is_default_home() check; the LTS, CI and test-suite gates and every consent gate stay. The heartbeat keeps its own default-home rule. - #37463 (8de422d): installs that are off only because an older build wrote telemetry.enabled: false into their config are shown the Privacy chapter once, in an off form that names Kiro telemetry, with Turn on performance metrics / Keep off. kiro_export.off_offer_due decides that case; Keep off records only the notice version so it is not asked again. - #37545 (09b0ddc): test only. The TestOffOffer tests fake the default data home, since the offer is asked only there and the test home is a private KIROCREW_HOME. All three picks applied without conflicts; each backported patch is identical to its main commit (git range-diff shows no change). (cherry picked from commit 2a679d6) (cherry picked from commit 8de422d) (cherry picked from commit 09b0ddc) Co-authored-by: Raymond Chen <chenmingwei23@users.noreply.github.com>
Problem / Motivation
Goal: Installs under a non-default
KIROCREW_HOME(dev homes, pods, worktree previews) also send product metrics to the built-in Kiro telemetry destination, under the same consent rules as any other install.#37183 hid the
kiro-telemetrydestination under a non-default data home, copying the daily heartbeat's rule. Those installs are people using the product, so their product metrics are missing.Why it matters
Product usage from people who run Kiro Crew under their own data home (common for developers and pods) is invisible today, even after they acknowledged the notice that names the destination.
Not a goal
What changed (motivation -> approach -> change)
Owner decision (2026-11-15): counting dev machines is acceptable. The smallest change is to drop the one check.
kiro_export.destinations()drops thebeacon.is_default_home()check. LTS, CI and the test-suite gate stay.kiro_export.exported,notice_shown,outbound_consented, the off switches or theotlp_hostspolicy.docs/guides/telemetry-otlp-export.md(who-sends table),docs/system-specs/modules/metrics.md, the crew-log telemetry RFC export paragraph; two docstrings that cited the non-default home as an example.Backwards compatibility
Behaviour change by design: an install under a non-default
KIROCREW_HOMEthat has recording on and has seen the version 3 notice now exportsPRODUCT_METRICSto Kiro telemetry. It also now lists the destination in Settings > Privacy andkirocrew telemetry status. Nothing else changes.Tests
test/metrics/test_kiro_export_destination.py: newtest_a_non_default_home_gets_it(the test fixture's private home is non-default, and the destination is listed); the "not listed" case dropshomeand keeps CI, LTS and the suite guard; the fixture no longer pretends the home is default, so every existing case now runs under a non-default home.-n 2:test_kiro_export_destination.py,test_telemetry_consent_notice.py,test_usage_notice.py,test_telemetry_handlers_cov80.py,metrics/test_otlp_endpoint_list.py,test_lts_telemetry_endpoint.py,test_api_theme_config.py: 356 passed.Manual verification
N/A: one gate removed in a pure function; the wire test drives the real provider, build and exporter against a loopback receiver from a non-default home.
Screenshots / video
N/A: no file under
website/changes.Related Issues
Follow-up to #37183. Related #21270.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.