Skip to content

fix(telemetry): default daemon to production endpoint; emit app_usage on pilotctl call#293

Merged
TeoSlayer merged 2 commits into
mainfrom
fix/telemetry-daemon-default-and-call-usage
Jun 21, 2026
Merged

fix(telemetry): default daemon to production endpoint; emit app_usage on pilotctl call#293
TeoSlayer merged 2 commits into
mainfrom
fix/telemetry-daemon-default-and-call-usage

Conversation

@TeoSlayer

Copy link
Copy Markdown
Collaborator

What

Two telemetry gaps closed:

1. Daemon never sent events by default
The -telemetry-url flag defaulted to "" (hard no-op) unless PILOT_TELEMETRY_URL was set explicitly. The telemetry.DefaultEndpoint constant was only printed in help text, never used. All app_usage events from the daemon supervisor were silently dropped.

2. pilotctl appstore call never emitted app_usage
The app_usage kind was only reachable through the daemon's internal supervisor path, not the direct IPC call path that users actually invoke. Every pilotctl appstore call <id> <method> went untracked.

Fix

  • cmd/daemon/main.go: fall back to telemetry.DefaultEndpoint when PILOT_TELEMETRY_URL is unset (same pattern pilotctl already uses)
  • cmd/pilotctl/appstore.go: emit app_usage after a successful call, consent-gated + best-effort

Test

Both paths can be verified with PILOT_TELEMETRY_URL=https://telemetry.pilotprotocol.network and checking BigQuery for incoming events.

… on call

- cmd/daemon/main.go: default -telemetry-url to telemetry.DefaultEndpoint
  when PILOT_TELEMETRY_URL is unset. Previously the daemon silently dropped
  all telemetry because the flag defaulted to "" (hard no-op).
- cmd/pilotctl/appstore.go: emit app_usage event after a successful
  `pilotctl appstore call`. Previously this event was only reachable through
  the daemon supervisor path, not the direct IPC call path.

Both emissions are consent-gated (telemetry flag, default on) and best-effort.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@TeoSlayer TeoSlayer merged commit 14aad91 into main Jun 21, 2026
10 checks passed
@TeoSlayer TeoSlayer deleted the fix/telemetry-daemon-default-and-call-usage branch June 21, 2026 10:51
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