Skip to content

feat(telemetry): emit per-app usage events from supervisor callFrom (PILOT-402)#20

Merged
TeoSlayer merged 1 commit into
mainfrom
openclaw/pilot-402-20260616-142427
Jun 16, 2026
Merged

feat(telemetry): emit per-app usage events from supervisor callFrom (PILOT-402)#20
TeoSlayer merged 1 commit into
mainfrom
openclaw/pilot-402-20260616-142427

Conversation

@matthew-pilot

Copy link
Copy Markdown
Collaborator

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 app
  • method — the called method
  • caller_id — the calling app (empty = daemon/pilotctl)
  • ok — whether the call succeeded
  • dur_ms — call duration in milliseconds
  • err_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 TelemetryEmitter interface via Deps.Telemetry and defaults to a no-op when no emitter is wired.

Changes

  • plugin/appstore/telemetry.go — new file: TelemetryEvent, TelemetryEmitter interface, noopEmitter
  • plugin/appstore/service.go — added Deps.Telemetry field
  • plugin/appstore/supervisor.go — wired emission in callFrom, added emitUsage helper, nil-safe default in newSupervisor

Verification

  • 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

…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

codecov Bot commented Jun 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.24390% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
plugin/appstore/supervisor.go 90.00% 2 Missing and 2 partials ⚠️

📢 Thoughts on this report? Let us know!

@TeoSlayer TeoSlayer merged commit b9d8d97 into main Jun 16, 2026
5 checks passed
@TeoSlayer TeoSlayer deleted the openclaw/pilot-402-20260616-142427 branch June 16, 2026 17:55
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