Skip to content

feat(cli): add os, osVersion, arch to telemetry properties#9761

Open
lambertjosh wants to merge 1 commit intomainfrom
feat/telemetry-os-field
Open

feat(cli): add os, osVersion, arch to telemetry properties#9761
lambertjosh wants to merge 1 commit intomainfrom
feat/telemetry-os-field

Conversation

@lambertjosh
Copy link
Copy Markdown
Contributor

Adds explicit os, osVersion, and arch fields to the shared telemetry props in @kilocode/kilo-telemetry. They're populated once at Telemetry.init() from process.platform, os.release(), and process.arch, and flow into every PostHog event and OTel span via the existing track() spread.

Context: paired with #9759. Today the platform property accidentally double-serves as both client identity (cli/vscode/jetbrains) and host OS (via process.platform fallback when KILO_PLATFORM is unset). #9759 collapses platform to pure client identity; this PR restores OS as a first-class dimension so triage queries, Windows-vs-macOS breakdowns, etc. keep working.

Field naming uses non-prefixed os / osVersion / arch instead of PostHog's $os / $os_version conventions. The browser SDK auto-captures $os with a different value space ("Mac OS X", "Windows", "Linux") while Node's process.platform returns "darwin" / "win32" / "linux" — mixing them under one name would muddy existing browser-event queries in dbt (stg_posthog__person_identity.sql). Downstream can coalesce(properties:"$os", properties:"os") if it ever needs a unified view.

No embedder changes required: VS Code, JetBrains, cloud code-review, and app-builder all spawn kilo serve so they inherit these values automatically from the CLI process.

Adds explicit OS fields (process.platform, os.release(), process.arch)
to every PostHog event and OTel span via the shared TelemetryProperties
initializer. Previously the 'platform' property double-served as both
client identity ('cli'/'vscode'/'jetbrains') and host OS (via
process.platform fallback). With #9759 collapsing 'platform' to pure
client identity, this restores OS as a first-class dimension for
triage and adoption breakdowns.

Uses non-prefixed field names ('os', 'osVersion', 'arch') to avoid
clashing with PostHog browser SDK's auto-captured '$os'/'$os_version'
properties, which use a different value space ('Mac OS X' vs 'darwin').
@kilo-code-bot
Copy link
Copy Markdown
Contributor

kilo-code-bot Bot commented Apr 30, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (3 files)
  • .changeset/telemetry-os-field.md
  • packages/kilo-telemetry/src/__tests__/telemetry.test.ts
  • packages/kilo-telemetry/src/telemetry.ts

Reviewed by gpt-5.5-2026-04-23 · 125,762 tokens

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.

1 participant