Skip to content

Telemetry categories: opt-in selection + lightweight default set#272

Open
Sayan- wants to merge 3 commits into
mainfrom
sayan/kernel-1342-switch-to-opt-in-for-categories
Open

Telemetry categories: opt-in selection + lightweight default set#272
Sayan- wants to merge 3 commits into
mainfrom
sayan/kernel-1342-switch-to-opt-in-for-categories

Conversation

@Sayan-
Copy link
Copy Markdown
Contributor

@Sayan- Sayan- commented Jun 3, 2026

What changes

  • Category selection is now opt-in. A browser config captures exactly the categories set to enabled: true; anything omitted is off (previously omitted = on). A request that enables nothing clears telemetry.
  • The default set (no browser config given, e.g. enabled: true) is now the lightweight operational signals: control, connection, system, captcha. The CDP categories (console, network, page, interaction) and screenshot are dropped from the default and must be opted into.

Why

"Just turn it on" should not spin up the CDP collector or unleash the high-volume streams. With this default, the collector only starts when a CDP category is explicitly enabled, and monitor (collector health) rides along only then. This is the firehose-safe default.

Test plan

  • Rewrote tests
  • Updated telemetry session + collector-failure tests for the non-CDP default
  • Full non-e2e suite passes

Note

Cursor Bugbot is generating a summary for commit 71d3c04. Configure here.

Sayan- and others added 2 commits June 3, 2026 16:25
Selection is now opt-in: a provided browser config captures exactly the
categories set to enabled:true, and anything omitted is off (previously an
omitted category defaulted to on). A request that enables nothing clears the
configuration.

The default set (used when no browser config is given) drops the CDP
categories and screenshot, leaving the lightweight operational signals
(control, connection, system, captcha). "Just turn it on" therefore never
starts the CDP collector or emits high-volume streams; CDP and screenshots
are opt-in.

Reverts the opt-out fill from #268 (not yet consumed by anything).

Co-authored-by: Cursor <cursoragent@cursor.com>
Pin the forward-compatibility guarantee that a newer control plane can send a
telemetry category this image does not yet know: the strict handler decodes the
body with encoding/json (no DisallowUnknownFields), so unknown categories are
ignored, not rejected, and known categories still apply.

Co-authored-by: Cursor <cursoragent@cursor.com>
@Sayan- Sayan- marked this pull request as ready for review June 4, 2026 19:18
@Sayan- Sayan- requested review from archandatta and rgarcia and removed request for archandatta June 4, 2026 19:18
@firetiger-agent
Copy link
Copy Markdown

Created a monitoring plan for this PR.

What this PR does: Changes browser telemetry to fully opt-in — the CDP categories (console, network, page, interaction) are removed from the default capture set so the CDP collector is never started unless explicitly requested.

Intended effect:

  • Default telemetry volume: baseline was CDP categories emitted for all default-configured sessions; confirmed if console/network/page/interaction events drop toward zero for sessions without explicit browser config.
  • PUT /telemetry 400/500 rate: baseline 0/hr; confirmed if it stays at 0 post-deploy (no regression in the config-apply path).
  • API 5xx rate: baseline 0.001–0.077% during active hours; confirmed if it remains in this range post-deploy.

Risks:

  • Silent telemetry data loss for partial configs — any caller sending a partial browser config (e.g., only screenshot: true) and expecting other categories from old defaults will silently receive nothing for those categories; alert if users report missing console/network/page events in sessions that previously captured them.
  • PUT /telemetry 500s (CDP collector start failure) — new error in API logs: "failed to start telemetry" where none existed before; alert if >5/hr.
  • POST /browsers 500 regression — if a VM image bug crashes on startup; alert if 500 rate >0.5% for 2+ consecutive hours (baseline 0.001–0.077%).
  • New telemetry ERROR patterns — pre-existing "copy telemetry stream / context canceled" logs (5–17/hr) are expected noise; alert on any new error body text in telemetry-related log lines.

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

View monitor

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