Skip to content

Add telemetry support to browser-pools CLI commands#205

Draft
Sayan- wants to merge 2 commits into
mainfrom
hypeship/cli-pool-telemetry
Draft

Add telemetry support to browser-pools CLI commands#205
Sayan- wants to merge 2 commits into
mainfrom
hypeship/cli-pool-telemetry

Conversation

@Sayan-

@Sayan- Sayan- commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Brings the CLI to parity with the API/SDK browser-pool telemetry surface (shipped in kernel-go-sdk v0.79.0).

What changed

  • kernel browser-pools create --telemetry=all|off|<categories> — set the telemetry config applied to browsers warmed into the pool.
  • kernel browser-pools update --telemetry=... — update pool telemetry (applies only to browsers warmed after the update).
  • kernel browser-pools acquire --telemetry=... — per-lease telemetry override, merged onto the pool config.
  • kernel browser-pools get — now displays the pool's active telemetry in the details table.
  • kernel browsers create --pool-id/--pool-name --telemetry=...--telemetry is now an allowed per-lease flag (previously treated as a conflicting config flag and ignored) and is forwarded as an acquire override.
  • Bumps kernel-go-sdk to v0.79.0.

The flag semantics reuse the existing single-browser telemetry parsing (all / off / comma-separated category list), so pool and browser telemetry behave identically.

Testing

  • go test ./... passes.
  • New unit tests cover create/update/acquire telemetry param building, the all/off/category and invalid-category paths, and the shared acquire builder.
  • go vet ./... clean.

🤖 Generated with Claude Code


Code quality pass

  • Deslop: no changes needed — helper doc-comments match the existing build*TelemetryParam siblings, guards are idiomatic Go, no casts/dead code.
  • Thermonuclear review remediation: collapsed five near-identical all/off/categories switch builders (browser create/update + pool create/update/acquire) into a single resolveTelemetryFlag resolver with thin per-endpoint adapters. The flag grammar now has one source of truth (case "all" appears exactly once in the codebase).

Live test plan (built from this branch, run against the API with a real key)

Built bin/kernel off this branch and exercised every new path end-to-end:

# Scenario Result
T1 browser-pools create --telemetry=console,network ✅ stored config = console, network + always-on operational set (control/connection/system/captcha)
T2 browser-pools get (table) ✅ new Telemetry row renders console, network, control, connection, system, captcha
T3 browser-pools update --telemetry=all ✅ resolves to default operational set; summary printed; get confirms
T4 browser-pools update --telemetry=off get shows Telemetry: disabled
T5 browser-pools acquire --telemetry=page (pool telemetry off) ✅ leased browser came up with page + operational — override reaches the actual browser (verified via browsers get <session>)
T6 browser-pools update --telemetry=bogus ✅ rejected with clear error, pool unchanged
T7 browsers create --pool-name … --telemetry=console ✅ forwarded as acquire override (previously silently dropped); leased browser has console + operational
T8 browsers create --pool … --telemetry=nope ✅ rejected, no browser leased
invalid --telemetry on create ✅ exits non-zero, no pool created (validation runs before the API call)

All warmed browsers were released and the test pool deleted. go build ./..., go test ./..., and go vet ./... all pass.

Bring the CLI to parity with the API/SDK telemetry surface for browser
pools: --telemetry on browser-pools create/update/acquire, display the
active config in browser-pools get, and forward --telemetry as an
acquire override on browsers create --pool-id/--pool-name.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@socket-security

socket-security Bot commented Jul 16, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedgolang/​github.com/​kernel/​kernel-go-sdk@​v0.78.0 ⏵ v0.79.072 +1100100100100

View full report

Replace five near-identical all/off/categories switches (browser
create/update + pool create/update/acquire) with a single
resolveTelemetryFlag resolver and thin per-endpoint adapters, so the
--telemetry flag grammar has one source of truth.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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