feat(telemetry): emit per-app usage events from supervisor callFrom (PILOT-402)#20
Merged
Merged
Conversation
…PILOT-402) After every IPC call through supervisor.callFrom (the single chokepoint for CLI+daemon+cross-app dispatch), a telemetry usage event is emitted with app_id, method, caller_id, ok status, duration, and optional error. The supervisor accepts a TelemetryEmitter interface via Deps.Telemetry and defaults to a no-op when no emitter is wired. The web4 daemon adapter wraps the consent-gated telemetry.Client to emit app_usage events, sharing the daemon's identity file and telemetry URL. Closes PILOT-402
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
After every IPC call through
supervisor.callFrom(the single chokepoint for CLI+daemon+cross-app dispatch), emit a telemetry usage event with:app_id— the target appmethod— the called methodcaller_id— the calling app (empty = daemon/pilotctl)ok— whether the call succeededdur_ms— call duration in millisecondserr_msg— error string on failure (empty on success)Why
Telemetry for app usage — one event per call, gated by consent. The supervisor now accepts a
TelemetryEmitterinterface viaDeps.Telemetryand defaults to a no-op when no emitter is wired.Changes
plugin/appstore/telemetry.go— new file:TelemetryEvent,TelemetryEmitterinterface,noopEmitterplugin/appstore/service.go— addedDeps.Telemetryfieldplugin/appstore/supervisor.go— wired emission incallFrom, addedemitUsagehelper, nil-safe default innewSupervisorVerification
go build ./...✅go vet ./...✅go test -count=1 -timeout 120s ./...✅ (all packages pass)Dependencies
This PR is the first of two — the companion web4 PR wires the real telemetry client in the daemon adapter.
Closes PILOT-402