import Kernel from '@onkernel/sdk';
const client = new Kernel({
apiKey: process.env['KERNEL_API_KEY'], // This is the default and can be omitted
});
const response = await client.browsers.telemetry.stream('id');
console.log(response.event);{
"seq": 2,
"event": {
"ts": 123,
"type": "<string>",
"source": {
"event": "<string>",
"metadata": {}
},
"data": {
"session_id": "<string>",
"target_id": "<string>",
"frame_id": "<string>",
"loader_id": "<string>",
"url": "<string>",
"nav_seq": 123,
"level": "<string>",
"text": "<string>",
"args": [
"<string>"
],
"stack_trace": {
"callFrames": [
{
"functionName": "<string>",
"scriptId": "<string>",
"url": "<string>",
"lineNumber": 123,
"columnNumber": 123
}
],
"description": "<string>",
"parent": "<unknown>"
}
},
"truncated": true
}
}Streams browser telemetry events as a server-sent events (SSE) stream. The stream closes when the browser session terminates. Each event frame includes an id: field containing a monotonically increasing sequence number; pass it as Last-Event-ID on reconnect to resume without gaps. The event: field is never set; all frames carry JSON in the data: field. A keepalive comment frame is sent every 15 seconds when no events arrive. Returns 404 if the browser session does not exist. If telemetry was not enabled on the session, the stream opens but no events are delivered.
import Kernel from '@onkernel/sdk';
const client = new Kernel({
apiKey: process.env['KERNEL_API_KEY'], // This is the default and can be omitted
});
const response = await client.browsers.telemetry.stream('id');
console.log(response.event);{
"seq": 2,
"event": {
"ts": 123,
"type": "<string>",
"source": {
"event": "<string>",
"metadata": {}
},
"data": {
"session_id": "<string>",
"target_id": "<string>",
"frame_id": "<string>",
"loader_id": "<string>",
"url": "<string>",
"nav_seq": 123,
"level": "<string>",
"text": "<string>",
"args": [
"<string>"
],
"stack_trace": {
"callFrames": [
{
"functionName": "<string>",
"scriptId": "<string>",
"url": "<string>",
"lineNumber": 123,
"columnNumber": 123
}
],
"description": "<string>",
"parent": "<unknown>"
}
},
"truncated": true
}
}Documentation Index
Fetch the complete documentation index at: https://tbd-6fc993ce-hypeship-auth-config-flags.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Last event sequence number for SSE reconnection (sent by SSE clients on reconnect)
Browser session ID
SSE stream of telemetry events
Envelope wrapping a browser telemetry event with its monotonic sequence number. Each SSE data: frame carries one envelope as JSON. The seq value is also emitted as the SSE id: field so clients can pass it as Last-Event-ID on reconnect.
Process-monotonic sequence number assigned by the browser VM. Pass as Last-Event-ID on reconnect to resume without gaps. Gaps in received seq values indicate dropped events.
x >= 1Union type representing any browser telemetry event. Discriminated on type. Events with a monitor_ prefix (monitor_screenshot, monitor_disconnected, monitor_reconnected, monitor_reconnect_failed, monitor_init_failed) are always emitted regardless of the category configuration in BrowserTelemetryConfig. All other event types are controlled by the per-category enable/disable flags.
Show child attributes