feat(kiloclaw): add controller telemetry checkins#1380
Merged
pandemicsyn merged 6 commits intomainfrom Mar 23, 2026
Merged
Conversation
Contributor
Code Review SummaryStatus: 3 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)N/A Other Observations (not in diff)Issues found in unchanged code that cannot receive inline comments:
Files Reviewed (3 files)
Fix these issues in Kilo Cloud Reviewed by gpt-5.4-20260305 · 227,360 tokens |
RSO
approved these changes
Mar 23, 2026
| previousRestarts = stats.restarts; | ||
| previousNetStats = currentNetStats; | ||
| } catch (err) { | ||
| console.error('[checkin] failed:', err); |
Contributor
There was a problem hiding this comment.
Do we want to phone home about whatever went wrong? I'm assuming we don't consume the controller logs in Axiom, so I'm wondering if we should set up a public Sentry DSN and just send a simple message to gain some visibility.
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.
Summary
Add controller phone-home telemetry from Fly machines to the kiloclaw worker and store it in a dedicated Analytics Engine dataset for machine-health observability.
POST /api/controller/checkin.KILOCODE_API_KEY+x-kiloclaw-gateway-token.KILOCLAW_CONTROLLER_AE/kiloclaw_controller_telemetry) separate from lifecycle event telemetry.controller/src/openclaw-version.ts.Reported telemetry payload (every check-in):
sandboxIdKILOCLAW_SANDBOX_IDenvmachineIdFLY_MACHINE_ID(or explicit dep override)controllerVersioncontrollerCommitopenclawVersionopenclaw --versionprobeopenclawCommitopenclaw --versionprobesupervisorStatetotalRestartsrestartsSinceLastCheckinuptimeSecondsloadAvg5mos.loadavg()[1]bandwidthBytesIn/proc/net/devdeltabandwidthBytesOut/proc/net/devdeltalastExitReasonfly-regionAE datapoint layout (
kiloclaw_controller_telemetry):blob1..blob9double1..double6index1Verification
pnpm lint(inkiloclaw/) — passpnpm typecheck(inkiloclaw/) — passpnpm test(inkiloclaw/) — pass (44files,949tests)pnpm test controller/src/checkin.test.ts src/gateway/env.test.ts— passpnpm test controller/src/checkin.test.ts controller/src/routes/health.test.ts src/routes/controller.test.ts— pass (23tests)bash scripts/controller-smoke-test.sh— pass (11 passed, 0 failed)bash scripts/controller-entrypoint-smoke-test.sh— pass (5 passed, 0 failed)bash scripts/controller-proxy-auth-smoke-test.sh— pass (expected proxy auth behavior:401without token, success with token)Visual Changes
N/A
Reviewer Notes
worker-configuration.d.tsregeneration changes were intentionally excluded from this branch./api/controller/checkinis intentionally custom and mounted before JWT/internal API middleware.eth0, then falls back to summing non-loopback interfaces.~/fd-plans/kiloclaw/controller-telemetry-deviations.md.