Skip to content

cli: opt-in telemetry categories + config echo#178

Merged
Sayan- merged 1 commit into
mainfrom
sayan/kernel-1342-switch-to-opt-in-for-categories
Jun 9, 2026
Merged

cli: opt-in telemetry categories + config echo#178
Sayan- merged 1 commit into
mainfrom
sayan/kernel-1342-switch-to-opt-in-for-categories

Conversation

@Sayan-

@Sayan- Sayan- commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

What changes

  • kernel browsers create/update --telemetry:
    • --telemetry=all -> default category set
    • --telemetry=off -> disable
    • --telemetry=console,network -> capture exactly those categories (opt-in, replace semantics). The old name=on/off DSL is removed.
  • settableCategories now covers all 9 (console, network, page, interaction, control, connection, system, screenshot, captcha). monitor is not settable (auto-managed, flows when a CDP category is captured).
  • After create/update, the CLI echoes the categories telemetry will capture, so the effect of an opt-in selection is obvious.
  • telemetry stream --categories filter set now covers every event category incl. monitor; event category is read from the SDK's typed Category field (removed the JSON/prefix fallback and the stale monitor->system mapping).

Test plan

  • CI
  • manual: --telemetry=all / =off / =console,network; confirm the echoed config; telemetry stream --categories monitor

Note

Medium Risk
Changes user-facing --telemetry semantics (breaking for scripts using name=on/off) and how stream filtering maps categories; behavior is localized to CLI with solid test coverage.

Overview
Reworks browser --telemetry on create/update to opt-in category selection with replace semantics: all (default set), off, or a comma list like console,network that captures only those categories. The old name=on/off DSL is removed.

Settable categories expand to nine (control, connection, system, screenshot, captcha, etc.); monitor stays non-settable but is included in telemetry stream --categories. After create/update, the CLI prints which categories telemetry will capture when --telemetry was used.

Streaming uses the SDK’s typed Category field (drops JSON/prefix fallback and monitorsystem remapping). Tests and flag help text are updated for the new behavior.

Reviewed by Cursor Bugbot for commit ce2f532. Bugbot is set up for automated code reviews on this repo. Configure here.

@Sayan- Sayan- force-pushed the sayan/kernel-1342-switch-to-opt-in-for-categories branch from db9c6bb to 220a993 Compare June 9, 2026 15:36
@Sayan- Sayan- changed the base branch from main to bmsaadat/cli-api-field-support June 9, 2026 15:36
@Sayan- Sayan- force-pushed the sayan/kernel-1342-switch-to-opt-in-for-categories branch from 220a993 to 90c1bee Compare June 9, 2026 15:36
Base automatically changed from bmsaadat/cli-api-field-support to main June 9, 2026 15:38
Rework `browsers create/update --telemetry` for the opt-in model:
- `--telemetry=all` captures the default set, `--telemetry=off` disables, and
  `--telemetry=console,network` captures exactly the listed categories (replace
  semantics). Drops the old name=on/off DSL.
- settableCategories expands to the full 9 (control, connection, system,
  screenshot, captcha added); monitor is not settable (auto).
- After create/update, echo the categories telemetry will capture.
- `telemetry stream --categories` filter set covers all event categories
  including monitor; category now read from the SDK's typed field directly.

NOTE: requires kernel-go-sdk >= v0.64 (new category fields). That bump is not
included here because it also requires migrating cmd/proxies to the new SDK
proxy API (unrelated). This change rebases on top of that SDK-bump PR; it does
not compile against the current pinned SDK (v0.58).

Co-authored-by: Cursor <cursoragent@cursor.com>
@Sayan- Sayan- force-pushed the sayan/kernel-1342-switch-to-opt-in-for-categories branch from 90c1bee to ce2f532 Compare June 9, 2026 17:05
@Sayan- Sayan- marked this pull request as ready for review June 9, 2026 17:05
@firetiger-agent

Copy link
Copy Markdown

Created a monitoring plan for this PR.

What this PR does: Changes the --telemetry flag for browsers create and browsers update from a name=on|off format to a simple opt-in list (console,network). Expands the available categories from 4 to 9. After a create or update, the CLI now echoes which categories are capturing.

Intended effect:

  • POST /browsers 400 rate: baseline ~0–14 errors/hr; confirmed if no new surge in 400s after release
  • API telemetry error logs: baseline ~0–2 WARN/ERROR/hr mentioning "telemetry"; confirmed if stays near zero with no new patterns

Risks:

  • Breaking change for scripted --telemetry users — any automation using the old network=on,page=off syntax will get a CLI-side parse error before reaching the API; alert if browser creation request volume drops >30% sustained for 2+ hours vs prior-week same-hour baseline
  • Opt-in replaces partial update — old network=off sent a targeted disable; new network sends an opt-in-only replace; users expecting selective disables may silently enable unintended categories; alert if any user-reported unexpected telemetry behavior surfaces
  • --categories=api / --categories=system stream filter removed — users streaming with these old category names will get a CLI validation error; no server-side signal, manual checkpoint on first user invocation with old filter

Status updates will be posted automatically on this PR as monitoring progresses.

View monitor

@Sayan- Sayan- requested review from archandatta and hiroTamada June 9, 2026 17:38
@Sayan- Sayan- merged commit fd2a3c9 into main Jun 9, 2026
7 checks passed
@Sayan- Sayan- deleted the sayan/kernel-1342-switch-to-opt-in-for-categories branch June 9, 2026 18:05
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