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
Copy file name to clipboardExpand all lines: browsers/telemetry/categories.mdx
+17-21Lines changed: 17 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,13 +3,24 @@ title: "Telemetry Categories"
3
3
description: "The categories a browser session can capture, what each contains, and their cost"
4
4
---
5
5
6
-
A category groups related telemetry events and is the unit you enable or disable. Selection is opt-in: a session captures a category only when you turn it on (see [Overview](/browsers/telemetry/overview)). This page lists every category, the event types it carries, and what it costs to capture.
6
+
A category groups related telemetry events and is the unit you enable or disable. Selection is opt-in: a session captures a category only when you turn it on.
7
7
8
8
For the full payload schema of any event type, see the [Stream telemetry events](https://kernel.sh/docs/api-reference/browser-telemetry/stream-telemetry-events-via-sse) endpoint in the API reference.
9
9
10
+
## Operational
11
+
12
+
These categories report on the session itself rather than page content.
13
+
14
+
| Category | Captures | Event types |
15
+
| --- | --- | --- |
16
+
|`control`| Computer-control API calls against the session |`api_call`|
17
+
|`connection`| CDP and live view connect/disconnect activity |`cdp_connect`, `cdp_disconnect`, `live_view_connect`, `live_view_disconnect`|
|`captcha`| Results of automated captcha solves |`captcha_solve_result`|
20
+
10
21
## Browser activity
11
22
12
-
These categories report what's happening in the page. Capturing any of them attaches a Chrome DevTools Protocol (CDP) collector to the session and produces far more events than the operational categories, so enable only the ones you need. None are in the default set.
23
+
These categories report what's happening in the page. Capturing any of them attaches a Chrome DevTools Protocol (CDP) collector to the session and produces highly granular page-level events. Capturing them adds overhead, so enable only the ones you need.
13
24
14
25
| Category | Captures | Event types |
15
26
| --- | --- | --- |
@@ -23,24 +34,15 @@ These categories report what's happening in the page. Capturing any of them atta
23
34
`interaction` events are browser-native DOM events observed in the page, not calls to the [computer-control](/browsers/computer-controls) API (those are reported by the `control` category).
24
35
</Note>
25
36
26
-
<Warning>
27
-
`screenshot` is the most expensive category to capture - each event carries an encoded image. Enable it only when you need visual snapshots, and prefer [live view](/browsers/live-view) or [replays](/browsers/replays) for continuous visibility.
28
-
</Warning>
37
+
### The monitor category
29
38
30
-
## Operational
31
-
32
-
These categories report on the session itself rather than page content, and they're cheap to capture. Together they make up the default set - what a session captures when you enable telemetry without naming any categories (`telemetry: { enabled: true }` or `--telemetry=all`), giving you a baseline view of session health and control activity.
39
+
`monitor` reports the health of the CDP collector itself: `monitor_disconnected`, `monitor_reconnected`, `monitor_reconnect_failed`, and `monitor_init_failed`.
33
40
34
-
| Category | Captures | Event types |
35
-
| --- | --- | --- |
36
-
|`control`| Computer-control API calls against the session |`api_call`|
37
-
|`connection`| CDP and live view connect/disconnect activity |`cdp_connect`, `cdp_disconnect`, `live_view_connect`, `live_view_disconnect`|
|`captcha`| Results of automated captcha solves |`captcha_solve_result`|
41
+
It isn't directly settable. It flows automatically whenever any of the browser-activity categories are captured. You can still [filter the stream](/browsers/telemetry/streaming) by `monitor` to isolate these events.
40
42
41
43
## Data sensitivity
42
44
43
-
Telemetry is off by default, and the [default set](#operational) carries operational metadata only - no page content. The browser-activity categories are different: they capture what actually flows through the session, which is your own browser's data and can include credentials and personal information.
45
+
Telemetry is off by default and the default set carries operational metadata only. The browser-activity categories are different: they capture what actually flows through the session, which is your own browser's data and can include credentials and personal information.
44
46
45
47
| Category | Can contain sensitive data |
46
48
| --- | --- |
@@ -58,9 +60,3 @@ Some exposure is reduced for you automatically: input into sensitive fields such
58
60
<Warning>
59
61
If you operate under HIPAA, GDPR, or similar obligations, be deliberate about the browser-activity categories: pointing them at a site that handles regulated data captures that data into storage. If you have compliance requirements around what Kernel may process, [contact us](mailto:security@kernel.sh) before enabling them.
60
62
</Warning>
61
-
62
-
## The monitor category
63
-
64
-
`monitor` reports the health of the CDP collector itself: `monitor_disconnected`, `monitor_reconnected`, `monitor_reconnect_failed`, and `monitor_init_failed`.
65
-
66
-
It isn't directly settable. It flows automatically whenever any [browser-activity category](#browser-activity) is captured - since those are what attach the collector - and is silent otherwise. You can still [filter the stream](/browsers/telemetry/streaming) by `monitor` to isolate these events.
Copy file name to clipboardExpand all lines: browsers/telemetry/overview.mdx
+11-8Lines changed: 11 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
2
title: "Telemetry Overview"
3
-
description: "Capture a real-time, categorized stream of what happens inside a browser session"
3
+
description: "Capture what happens inside a browser session"
4
4
---
5
5
6
6
Telemetry captures events from inside a browser session - console output, network activity, page lifecycle, user interactions, captcha solves, and operational signals like crashes or connection changes. Once enabled, you can [stream them](/browsers/telemetry/streaming) live or pull them later for analysis.
List exactly the categories you want under `telemetry.browser`. Only those are captured; everything else stays off. Don't set the top-level `enabled` flag in this case - the presence of category settings is what turns telemetry on:
46
+
List the categories you want under `telemetry.browser`. For example, this session captures `console` and `network` only:
description: "Consume a session's live telemetry stream from the SDK, CLI, or raw SSE"
3
+
description: "Consume a session's live telemetry stream from the SDKor CLI"
4
4
---
5
5
6
-
Once a session has telemetry [enabled](/browsers/telemetry/overview), you can stream its events in real time. The stream stays open until the session terminates, and each event is wrapped in an envelope with a monotonic `seq` number you can use to reconnect without gaps:
The `data` payload differs per event type; see the [API reference](https://kernel.sh/docs/api-reference/browser-telemetry/stream-telemetry-events-via-sse) for each type's schema. An event whose payload exceeds 1 MB is dropped and the envelope is flagged `truncated: true`.
6
+
Once a session has telemetry [enabled](/browsers/telemetry/overview), you can stream its events in real time. The stream stays open until the session terminates.
21
7
22
8
## Via SDK
23
9
@@ -48,6 +34,8 @@ with kernel.browsers.telemetry.stream(session_id) as stream:
48
34
```
49
35
</CodeGroup>
50
36
37
+
To filter, check `event.category` and `event.type` in your loop. If the stream drops, re-open it with the last `seq` you processed as `last_event_id` to resume without gaps.
38
+
51
39
## Via CLI
52
40
53
41
Stream events to your terminal. The command runs until the session ends or you interrupt it:
@@ -56,7 +44,7 @@ Stream events to your terminal. The command runs until the session ends or you i
56
44
kernel browsers telemetry stream <session-id>
57
45
```
58
46
59
-
Filter the stream client-side by category or event type (repeatable or comma-separated), and use `-o json` to emit newline-delimited JSON envelopes for piping:
CLI `--categories` and `--types` are applied locally to the stream - they don't change what the session captures. To change capture, update the session's [telemetry categories](/browsers/telemetry/categories).
74
-
</Info>
75
-
76
-
## Via raw SSE
77
-
78
-
The stream is a standard [SSE](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events) endpoint, so any SSE-capable client works:
Each `data:` frame carries one JSON envelope, and the frame's `id:` field is the envelope's `seq`. A keepalive comment is sent every 15 seconds when no events arrive. The `event:` field is never set.
87
-
88
-
## Resuming after a disconnect
61
+
### Resuming after a disconnect
89
62
90
-
To pick up where you left off, resume from the last `seq` you processed - the server replays events after that sequence number. SDK clients reconnect automatically. For raw SSE, send the last seq as the `Last-Event-ID` header; with the CLI, pass `--seq`:
63
+
The stream is a single connection; it does not reconnect on its own. Each event carries a monotonic `seq`, so to resume without gaps you re-open the stream and pass the last `seq` you processed.
Copy file name to clipboardExpand all lines: introduction/observe.mdx
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: "Observe"
3
3
description: "Watch your agent work, debug what went wrong"
4
4
---
5
5
6
-
Browser agents fail in ways that don't show up in logs. Kernel gives you several ways to see what's actually happening — live, after the fact, frame by frame, line by line, and event by event.
6
+
Browser agents fail in ways that don't show up in logs. Kernel gives you several ways to see what's actually happening: live, after the fact, frame by frame, line by line, and event by event.
7
7
8
8
## Live view
9
9
@@ -60,7 +60,7 @@ Add `?readOnly=true` for a non-interactive view, or enable [kiosk mode](/browser
60
60
61
61
## Replays
62
62
63
-
Replays are MP4 recordings you start and stop on demand — capture as many clips per session as you need. They're the right tool for post-hoc debugging: a failed run gives you one or more videos to scrub through, share, or attach to a bug report.
63
+
Replays are MP4 recordings you start and stop on demand - capture as many clips per session as you need. They're the right tool for post-hoc debugging: a failed run gives you one or more videos to scrub through, share, or attach to a bug report.
64
64
65
65
Replays can also be enabled on managed auth sessions, so you can [debug failed logins](https://www.kernel.sh/docs/auth/configuration#record-sessions-for-debugging) the same way.
66
66
@@ -119,7 +119,7 @@ Full reference: [Replays](/browsers/replays).
119
119
120
120
## Screenshots
121
121
122
-
Pull a frame at any moment with computer controls — useful for snapshotting state at decision points, attaching to traces, or feeding back into a vision model.
122
+
Pull a frame at any moment with computer controls - useful for snapshotting state at decision points, attaching to traces, or feeding back into a vision model.
123
123
124
124
<CodeGroup>
125
125
```typescript Typescript/Javascript
@@ -194,7 +194,7 @@ Full reference: [Logs](/apps/logs).
194
194
195
195
## Telemetry
196
196
197
-
Telemetry is a real-time, structured stream of what happens inside a session — console output, network activity, page lifecycle, interactions, and operational signals like crashes. Unlike a video or screenshot, it's machine-readable, so it's the right tool for feeding session activity into your own observability pipeline or reacting to events programmatically. Enable it at creation, then stream the events:
197
+
Telemetry is a real-time, structured stream of what happens inside a session: console output, network activity, page lifecycle, interactions, and operational signals like crashes. Unlike a video or screenshot, it's machine-readable, so it's the right tool for feeding session activity into your own observability pipeline or reacting to events programmatically. Enable it at creation, then stream the events:
0 commit comments