Skip to content

fix: enrich telemetry with install method and token savings#432

Merged
pszymkowiak merged 1 commit intodevelopfrom
fix/telemetry-enriched-payload
Mar 9, 2026
Merged

fix: enrich telemetry with install method and token savings#432
pszymkowiak merged 1 commit intodevelopfrom
fix/telemetry-enriched-payload

Conversation

@pszymkowiak
Copy link
Collaborator

Summary

  • Add install_method detection (homebrew/cargo/script/nix/other) via binary path inspection
  • Add tokens_saved_24h and tokens_saved_total to telemetry payload
  • Add Tracker::total_tokens_saved() and Tracker::tokens_saved_24h() methods
  • Points to new dedicated rtk-telemetry service (telemetry.rtk-ai.app)

Backend

The rtk-telemetry Cloud Run service is already deployed and accepting enriched payloads. This PR updates the client to send the new fields.

Test plan

  • cargo test telemetry — 4/4 tests pass
  • Test ping accepted by rtk-telemetry (HTTP 204)
  • Stats endpoint shows install_methods + tokens aggregation

@pszymkowiak pszymkowiak force-pushed the fix/telemetry-enriched-payload branch from 4263507 to 81b09f7 Compare March 9, 2026 10:59
- Add install_method detection (homebrew/cargo/script/nix/other)
- Add tokens_saved_24h and tokens_saved_total to payload
- Add Tracker::total_tokens_saved() and Tracker::tokens_saved_24h() methods
- Point telemetry to new dedicated rtk-telemetry service

Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>
@pszymkowiak pszymkowiak force-pushed the fix/telemetry-enriched-payload branch from 81b09f7 to be0f916 Compare March 9, 2026 11:39
@pszymkowiak pszymkowiak merged commit 7f7d713 into develop Mar 9, 2026
3 of 4 checks passed
pszymkowiak added a commit that referenced this pull request Mar 10, 2026
- Add install_method detection (homebrew/cargo/script/nix/other)
- Add tokens_saved_24h and tokens_saved_total to payload
- Add Tracker::total_tokens_saved() and Tracker::tokens_saved_24h() methods
- Point telemetry to new dedicated rtk-telemetry service

Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>
pszymkowiak added a commit that referenced this pull request Mar 10, 2026
* fix(cicd): Add security check on dev branch PR

add security check cicd on dev branch PR

Signed-off-by: aesoft <43991222+aeppling@users.noreply.github.com>

* fix: enrich telemetry with install_method and token savings

- Add install_method detection (homebrew/cargo/script/nix/other)
- Add tokens_saved_24h and tokens_saved_total to payload
- Add Tracker::total_tokens_saved() and Tracker::tokens_saved_24h() methods
- Point telemetry to new dedicated rtk-telemetry service

Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>

* fix: detect install method on Windows paths

Add backslash variants for .cargo\bin and .local\bin detection

Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>

* fix: enrich telemetry with install_method and token savings (#432)

- Add install_method detection (homebrew/cargo/script/nix/other)
- Add tokens_saved_24h and tokens_saved_total to payload
- Add Tracker::total_tokens_saved() and Tracker::tokens_saved_24h() methods
- Point telemetry to new dedicated rtk-telemetry service

Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>

* fix: 4 critical bugs — git exit code, jq warning, npm run doubling, pnpm build filter (#458)

* fix: propagate exit code 128 when rtk git status runs outside a repo (#435)

Previously printed "Not a git repository" to stdout and returned exit 0.
Now prints to stderr and exits with git's actual exit code (128).

Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>

* fix: warn when jq is not installed instead of silent exit (#430)

Hook now prints a warning to stderr before exiting cleanly,
so users know the rewrite pipeline is not functioning.

Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>

* fix: strip leading 'run' arg to prevent npm run run doubling (#438)

When user types 'rtk npm run build', args contain ["run", "build"].
Since npm_cmd always prepends 'run', this caused 'npm run run build'.
Now strips the leading 'run' from args if present.

Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>

* fix: route pnpm build through generic passthrough instead of Next.js filter (#454)

pnpm build was hardcoded to next_cmd::run which misparses Vite/other
framework output as errors. Now uses generic passthrough.

Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>

* docs: bump README version to 0.28.0

Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>

---------

Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>

* fix: warn when rtk binary is not in PATH instead of silent exit (#430) (#465)

Applies the same fix as jq — all silent exits now warn on stderr.

Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>

---------

Signed-off-by: aesoft <43991222+aeppling@users.noreply.github.com>
Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>
Co-authored-by: aesoft <43991222+aeppling@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.

2 participants