Skip to content

Add browser telemetry guide#384

Open
ehfeng wants to merge 7 commits into
mainfrom
docs/browser-telemetry-guide
Open

Add browser telemetry guide#384
ehfeng wants to merge 7 commits into
mainfrom
docs/browser-telemetry-guide

Conversation

@ehfeng
Copy link
Copy Markdown
Contributor

@ehfeng ehfeng commented May 28, 2026

Summary

  • Adds browsers/telemetry.mdx — a full guide for the SSE-based browser telemetry stream covering enabling capture, consuming events, per-category configuration (console, network, page, interaction), reconnection via Last-Event-ID, updating config on running sessions, and the event envelope schema
  • Adds telemetry to the sidebar nav under Working with your browser > Basics
  • Updates introduction/observe.mdx with a browser telemetry section and quick-start example

Test plan

  • mintlify dev renders the new page correctly
  • All internal links resolve (telemetry from observe, observe from telemetry)
  • Code examples in TypeScript and Python are syntactically correct
  • Event type tables render properly

🤖 Generated with Claude Code


Note

Low Risk
Documentation-only changes with no runtime, API, or auth code modifications.

Overview
Adds a Browser Telemetry guide (browsers/telemetry.mdx) documenting SSE streaming of console, network, page, interaction, and system events: enable/disable and per-category config at create and via PATCH, consuming the stream (SDK, HTTP, CLI), reconnection with Last-Event-ID, and the event envelope plus type-specific payloads.

Wires the feature into the docs site: nav entry under Working with your browser → Basics, a new Browser telemetry section and “picking the right tool” bullet on Observe, and CLI reference for --telemetry on create/update and kernel browsers telemetry stream (filters, --seq, NDJSON output).

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

Documents the SSE-based browser telemetry stream — enabling capture,
consuming events, per-category configuration, reconnection, and the
full event type reference across console, network, page, interaction,
and monitor categories.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@firetiger-agent
Copy link
Copy Markdown

Firetiger deploy monitoring skipped

This PR didn't match the auto-monitor filter configured on your GitHub connection:

Any PR that changes the kernel API. Monitor changes to API endpoints (packages/api/cmd/api/) and Temporal workflows (packages/api/lib/temporal) in the kernel repo

Reason: PR only adds documentation (MDX files) with no changes to API endpoints or Temporal workflows.

To monitor this PR anyway, reply with @firetiger monitor this.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7ca465dd5e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread browsers/telemetry.mdx
<CodeGroup>
```typescript Typescript/Javascript
const response = await fetch(
`https://api.onkernel.com/v1/browsers/${kernelBrowser.session_id}/telemetry`,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use the unversioned browser endpoint

When a user copies this SSE URL, it points at https://api.onkernel.com/v1/browsers/..., but the Kernel API reference and existing raw HTTP examples in this repo use the unversioned https://api.onkernel.com/browsers/... path (PATCH /browsers/{id}, GET /browsers/{id}, and the project-scoping curl example). This same /v1 prefix is repeated in the Python, observe, and reconnect examples, so users following the guide will likely hit a 404 instead of opening the telemetry stream unless the URL is changed to the documented base path.

Useful? React with 👍 / 👎.

@mintlify
Copy link
Copy Markdown
Contributor

mintlify Bot commented May 28, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
Kernel 🟢 Ready View Preview May 28, 2026, 4:49 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

cursor[bot]
cursor Bot approved these changes May 28, 2026
- Add CLI examples (create, update, telemetry stream) to all code blocks
- Document computed event heuristics (network_idle 500ms, layout_settled 1s)
- Add interaction rate-limiting (20/s) and sensitive input suppression
- Improve monitor event descriptions (screenshot triggers, reconnect details)
- Add event context fields table for cross-tab/navigation correlation
- Add telemetry commands to CLI reference (create --telemetry, update, stream)
- Restructure event envelope as a table with source.kind descriptions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale comment

Risk assessment: Very Low

Evidence from the current diff: this PR only adds and updates documentation content (browsers/telemetry.mdx, introduction/observe.mdx, reference/cli/browsers.mdx) plus one Mintlify navigation entry in docs.json. The synchronize update adds CLI examples/reference details and telemetry guide clarifications, but still does not modify production code, infrastructure, auth/permissions, data schemas, prompts used by models, or shared runtime logic.

I found no CODEOWNERS file requiring owner review. The PR is already approved, so I’m not submitting another approval; the risk level has not increased, so the existing approval can remain.

Open in Web View Automation 

Sent by Cursor Automation: Assign PR reviewers

@ehfeng ehfeng closed this May 28, 2026
@archandatta archandatta reopened this May 28, 2026
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale comment

Risk assessment: Very Low

Evidence from the current diff: this PR adds browsers/telemetry.mdx, updates introduction/observe.mdx and reference/cli/browsers.mdx, and adds one Mintlify navigation entry in docs.json. These are documentation and docs-navigation changes only, with no production code, infrastructure, auth/permissions, data schema, shared runtime logic, or model prompt/instruction changes.

I found no CODEOWNERS file requiring owner review. The PR is already approved, so I’m not submitting another approval. The risk has not increased, so the existing approval can remain.

Open in Web View Automation 

Sent by Cursor Automation: Assign PR reviewers

- Rename "Event categories" to "Event types"
- Rename "Event envelope" to "Event body"
- Add event.data field tables for all 22 event types
- Expand shared context fields (add target_type, loader_id)
- Replace em dashes with hyphens throughout

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale comment

Risk assessment: Very Low

Evidence from the current diff: this PR adds browsers/telemetry.mdx, updates introduction/observe.mdx and reference/cli/browsers.mdx, and adds one Mintlify navigation entry in docs.json. These are documentation and docs-navigation changes only, with no production code, infrastructure, auth/permissions, data schema, shared runtime logic, or model prompt/instruction changes.

I found no CODEOWNERS file requiring owner review. The PR is already approved, so I’m not submitting another approval. The synchronized changes do not increase risk, so the existing approval can remain.

Open in Web View Automation 

Sent by Cursor Automation: Assign PR reviewers

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale comment

Risk assessment: Very Low

Evidence from the current diff: this PR adds browsers/telemetry.mdx, updates introduction/observe.mdx and reference/cli/browsers.mdx, and adds one Mintlify navigation entry in docs.json. These are documentation and docs-navigation changes only, with no production code, infrastructure, auth/permissions, data schema, shared runtime logic, or model prompt/instruction changes.

I found no CODEOWNERS file requiring owner review. The PR is already approved, so I’m not submitting another approval. The synchronized changes do not increase risk, so the existing approval can remain.

Open in Web View Automation 

Sent by Cursor Automation: Assign PR reviewers

@archandatta archandatta requested a review from dprevoznik May 29, 2026 12:06
Comment thread browsers/telemetry.mdx Outdated
Comment thread browsers/telemetry.mdx Outdated
Comment thread browsers/telemetry.mdx Outdated
Copy link
Copy Markdown
Contributor

@dprevoznik dprevoznik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some comments!

- Replace raw HTTP reconnect example with TS/Python/CLI examples
- Clarify interaction events are browser-native DOM events, not computer controls API calls
- Reorder sections: Reconnecting > Updating telemetry > Event body > Event types

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Comment thread introduction/observe.mdx
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale comment

Risk assessment: Very Low

Evidence from the current diff: this PR only adds and updates Mintlify documentation content (browsers/telemetry.mdx, introduction/observe.mdx, reference/cli/browsers.mdx) plus one docs navigation entry in docs.json. It doesn’t modify production code, infrastructure, auth/permissions, data schemas, shared runtime logic, or model prompt/instruction files.

I found no CODEOWNERS file requiring owner review. The PR already has an approval, so I’m not submitting another approval. The synchronized changes don’t increase risk, so I’m not dismissing the existing approval.

Open in Web View Automation 

Sent by Cursor Automation: Assign PR reviewers

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale comment

Risk assessment: Very Low

Evidence from the current diff: this PR only adds and updates Mintlify documentation content (browsers/telemetry.mdx, introduction/observe.mdx, reference/cli/browsers.mdx) plus one docs navigation entry in docs.json. It doesn't modify production code, infrastructure, auth/permissions, data schemas, shared runtime logic, or model prompt/instruction files.

I found no CODEOWNERS file in the PR head, so I don't see a codeowner review requirement from the repo contents. The PR already has a Cursor approval, so I'm not submitting another approval. The synchronized changes don't increase risk, so I'm not dismissing the existing approval.

Open in Web View Automation 

Sent by Cursor Automation: Assign PR reviewers

- Add system_oom_kill and service_crashed event types with data schemas
- Rename Monitor section to System to match category name
- Add category field to event body spec and JSON example
- Fix --seq to document >= 1 (0 is rejected)
- List valid --categories values, note invalid ones are rejected

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Risk assessment: Very Low

Evidence from the current diff: this PR adds a new Mintlify documentation page (browsers/telemetry.mdx), adds one docs navigation entry in docs.json, and updates related documentation in introduction/observe.mdx and reference/cli/browsers.mdx. It doesn't modify production code, runtime behavior, infrastructure, auth/permissions, data schemas, shared libraries, or model prompt/instruction files.

I found no CODEOWNERS file in the repository contents, so I don't see a codeowner review requirement from the diff/repo structure. This PR already has an earlier cursor[bot] approval, and the current changes don't increase risk, so I'm not submitting a duplicate approval or dismissing the existing one.

Open in Web View Automation 

Sent by Cursor Automation: Assign PR reviewers

@archandatta archandatta requested a review from Sayan- June 3, 2026 12:25
Copy link
Copy Markdown
Contributor

@Sayan- Sayan- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The how-to flow here reads well. My one structural suggestion: the per-event field tables repeat the event schemas we already define in our OpenAPI spec (and ship as typed models in the SDKs), so they'll inevitably drift as events change. I'd keep this page focused on concepts, how-to, and a few example events, and point readers to the SDK types / API reference for the full per-event field details.

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.

4 participants