Skip to content

The telemetry outbox cursor

The outbox position is a checkpoint file per channel. It records which segment is open and how much each segment holds, and therefore what is waiting to be delivered. The records themselves are the queue. The checkpoint is the index over it.

This page covers the checkpoint's contents, the four channels that each have one, and how a record's position in a segment relates to its delivery. A record's life in the spool is on Telemetry outbox and replay.

One checkpoint per channel

xratud_status_outbox_<dataplane_uuid>_<dataplane_instance_uuid>.spool/
  logs/           events/           status/           kernel_returns/
    segments/
      segment-00000001.jsonl
      segment-00000002.jsonl
    checkpoint.json
    .lock
Channel Carries
logs Node and runtime log records, delivered through the failover endpoint
events Lifecycle and operation events
status Assignment status reports
kernel_returns Return-lane reports projected from a project kernel

Each channel has its own segments, its own checkpoint and its own lock, so one channel's backlog does not block another's delivery.

What the checkpoint holds

{
  "contract_version": "system.telemetry_outbox_runtime.checkpoint.v1",
  "current_segment_id": 7,
  "total_bytes": 418203,
  "segments": {
    "6": {
      "segment_id": 6,
      "file_name": "segment-00000006.jsonl",
      "record_count": 128,
      "byte_size": 262102,
      "created_at_epoch": 1771459100.0,
      "sealed": true
    },
    "7": {
      "segment_id": 7,
      "file_name": "segment-00000007.jsonl",
      "record_count": 61,
      "byte_size": 156101,
      "created_at_epoch": 1771459180.0,
      "sealed": false
    }
  }
}

current_segment_id names the open segment, sealed marks the segments that are closed to new appends, and total_bytes is the figure the spool budget is enforced against. The checkpoint is rebuilt from its segment entries on load, so the total always matches the segments it describes.

Appending moves the checkpoint

flowchart TB
  REC["Record handed over by the mux"]
  LOCK{{"Channel lock held"}}
  BUDGET{{"total_bytes plus this line<br/>within 64 MiB?"}}
  ROT{{"Open segment at<br/>128 records or 256 KiB?"}}
  SEAL["Seal it, open the next id"]
  APP["Append one line,<br/>raise record_count and byte_size"]
  CKPT[("checkpoint.json<br/>replaced atomically")]
  FAIL["Append refused,<br/>the report fails with it"]
  REC --> LOCK --> BUDGET
  BUDGET -->|"no"| FAIL
  BUDGET -->|"yes"| ROT
  ROT -->|"yes"| SEAL --> APP
  ROT -->|"no"| APP
  APP --> CKPT

The budget is checked before the rotation decision, so a spool at its limit refuses the append and the report that produced it. Append one line flushes to disk before returning, and checkpoint.json is written to a temporary file and renamed over the original.

The limits

Limit Value
Records per segment 128
Bytes per segment 256 KiB
Spool budget across all segments of a channel 64 MiB
Records read per delivery batch 100 by default

Delivery order

Records are read oldest first, ordered by segment id, then creation time, then outbox id, so a replay delivers in the order the node produced. A delivered batch is deleted from its segment. A refused batch is rewritten in place with its attempt count raised and its next attempt pushed back by the control plane's retry hint, which leaves the position unchanged and the records where they are.

Only records whose next attempt time has come are eligible, so a channel holding records under backoff reports them as pending without sending them again.

When a new process starts

A starting process begins with an empty spool and a fresh checkpoint per channel. Reports from before the start reach the control plane from their sources: assignment status from the control plane's ledger, kernel returns from the kernel's continuity store, and bodies from your observability bucket. See Resuming telemetry delivery after a crash.