You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### 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
- [x] CI
- [x] manual: `--telemetry=all` / `=off` / `=console,network`; confirm
the echoed config; `telemetry stream --categories monitor`
<!-- CURSOR_SUMMARY -->
---
> [!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 **`monitor`→`system`** remapping). Tests and flag help text
are updated for the new behavior.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
ce2f532. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Co-authored-by: Cursor <cursoragent@cursor.com>
browsersUpdateCmd.Flags().Bool("force", false, "Force viewport resize even when a live view or recording/replay is active")
2328
-
browsersUpdateCmd.Flags().String("telemetry", "", "Update telemetry: --telemetry=all to enable, --telemetry=off to disable, --telemetry=network=on,page=off for per-category")
2334
+
browsersUpdateCmd.Flags().String("telemetry", "", "Update telemetry (opt-in, replaces current selection): --telemetry=all (default set), --telemetry=off (disable), or --telemetry=console,network (capture exactly those categories)")
2329
2335
2330
2336
browsersCmd.AddCommand(browsersListCmd)
2331
2337
browsersCmd.AddCommand(browsersCreateCmd)
@@ -2591,7 +2597,7 @@ func init() {
2591
2597
browsersCreateCmd.Flags().Bool("viewport-interactive", false, "Interactively select viewport size from list")
2592
2598
browsersCreateCmd.Flags().String("pool-id", "", "Browser pool ID to acquire from (mutually exclusive with --pool-name)")
2593
2599
browsersCreateCmd.Flags().String("pool-name", "", "Browser pool name to acquire from (mutually exclusive with --pool-id)")
2594
-
browsersCreateCmd.Flags().String("telemetry", "", "Configure telemetry: --telemetry=all to enable, --telemetry=off to disable, --telemetry=network=on,page=off for per-category")
2600
+
browsersCreateCmd.Flags().String("telemetry", "", "Configure telemetry (opt-in): --telemetry=all (default set), --telemetry=off (disable), or --telemetry=console,network (capture exactly those categories)")
2595
2601
browsersCreateCmd.Flags().String("name", "", "Optional unique name for the browser session (used to find it later; set at creation only)")
2596
2602
browsersCreateCmd.Flags().StringArray("tag", nil, "Set a tag KEY=VALUE on the session (repeatable; up to 50 pairs)")
2597
2603
@@ -2622,7 +2628,7 @@ followed automatically by Chromium.`,
telemetryStream.Flags().StringSlice("categories", []string{}, "Filter by API event category (api,console,interaction,network,page,system); system covers monitor_* and cdp_* events")
2631
+
telemetryStream.Flags().StringSlice("categories", []string{}, "Filter by event category (console,network,page,interaction,control,connection,system,screenshot,captcha,monitor)")
2626
2632
telemetryStream.Flags().StringSlice("types", []string{}, "Filter by event type (e.g. network_response,console_error)")
2627
2633
telemetryStream.Flags().Int64("seq", -1, "Resume after sequence number N (Last-Event-ID); replays events with seq > N. Default -1 streams from now")
2628
2634
telemetryStream.Flags().StringP("output", "o", "", "Output format: json for newline-delimited JSON envelopes")
{"matching type passes", `{"type":"console_log","category":"console","ts":0}`, nil, []string{"console_log"}, true},
296
271
{"non-matching type drops", `{"type":"network_response","category":"network","ts":0}`, nil, []string{"console_log"}, false},
297
272
{"both filters pass when both match", `{"type":"network_response","category":"network","ts":0}`, []string{"network"}, []string{"network_response"}, true},
0 commit comments