Skip to content

fix(telemetry): restore write-only API key — broken since March 14 [v0.3.0]#739

Merged
kokevidaurre merged 3 commits intodevelopfrom
fix/telemetry-key
Apr 14, 2026
Merged

fix(telemetry): restore write-only API key — broken since March 14 [v0.3.0]#739
kokevidaurre merged 3 commits intodevelopfrom
fix/telemetry-key

Conversation

@kokevidaurre
Copy link
Copy Markdown
Contributor

Summary

Telemetry has been dead since March 14. Zero events in 30 days. Root cause: commit 6261882 replaced the write-only key with an env var no user has set.

Fix

Restore the embedded write-only key. Standard practice for CLI analytics — Segment, PostHog, Mixpanel all ship write-only keys in public code. The key can only write events; it cannot read or access any data. Users can opt out.

Impact

  • Restores telemetry for all users on v0.3.0
  • We can see active users, retention, feature usage again
  • 66K events collected before the break; pipeline is proven

Test plan

  • Build passes
  • After publish: verify events appear in BQ within 24h

Co-Authored-By: Claude noreply@anthropic.com

…arch 14

Commit 6261882 removed the telemetry key and replaced it with an env var
that no user has set. Result: zero telemetry events since ~March 14.

Write-only analytics keys are standard practice (Segment, PostHog,
Mixpanel all ship them in public code). The key can only write events;
it cannot read, delete, or access any data. Users can still opt out.

Closes #388 (GitHub Traffic API — this restores our primary data signal)

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions github-actions bot added the core label Apr 14, 2026
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a hardcoded, base64-encoded telemetry key as a fallback for CLI analytics. Feedback indicates that hardcoding this key violates engineering guidelines and poses a security risk, suggesting that the key should be injected during the build process or kept as a plain string for transparency if embedding is necessary.

Comment thread src/lib/telemetry.ts Outdated
Jorge Vidaurre and others added 2 commits April 14, 2026 00:05
Gemini review: base64 encoding adds no security and reduces transparency.
Plain string is honest — it's a write-only key, nothing to hide.

Co-Authored-By: Claude <noreply@anthropic.com>
Telemetry goes to our infrastructure only. No reason to let users
redirect it. They can opt out, but not redirect.

Co-Authored-By: Claude <noreply@anthropic.com>
@kokevidaurre kokevidaurre merged commit c84aed3 into develop Apr 14, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant