Documentation / @super-line/core / ClientTapEvent
Type Alias: ClientTapEvent
ClientTapEvent = {
bytes:number;dir:FrameDirection;f:Frame;k:"frame"; } | {i:number;k:"req.queued";m:string; } | {i:number;k:"req.dropped";m:string;why:RequestDropReason; } | {k:"deliver";kind:"event"|"topic";listeners:number;name:string; } | {k:"validate.fail";kind:"response"|"event"|"topic";message:string;name:string; } | {decision:RouteDecision;id:string;k:"route";n:string;sid:number; } | {attempt?:number;code?:number;delayMs?:number;k:"conn";phase:ConnPhase; } | {id:string;k:"doc";n:string;replicas:number; }
Defined in: packages/core/src/client-tap.ts:59
One observation from a client. Emitted synchronously at the site it describes, with LIVE payload references — an observer must not mutate them, and must snapshot anything it intends to keep.
Union Members
Type Literal
{ bytes: number; dir: FrameDirection; f: Frame; k: "frame"; }
A frame crossed the wire. bytes is its encoded size.
Type Literal
{ i: number; k: "req.queued"; m: string; }
A request was created but not sent — the socket was not writable. It will go out on reconnect.
Type Literal
{ i: number; k: "req.dropped"; m: string; why: RequestDropReason; }
A tracked request ended with no response.
Type Literal
{ k: "deliver"; kind: "event" | "topic"; listeners: number; name: string; }
An inbound event or topic payload was dispatched. listeners: 0 is a silent bug with no server-side symptom.
Type Literal
{ k: "validate.fail"; kind: "response" | "event" | "topic"; message: string; name: string; }
An inbound payload failed contract validation and was dropped (only under validate: 'inbound').
Type Literal
{ decision: RouteDecision; id: string; k: "route"; n: string; sid: number; }
An inbound row change was routed into one subscription. Fires once PER live subscription on the collection.
Type Literal
{ attempt?: number; code?: number; delayMs?: number; k: "conn"; phase: ConnPhase; }
The transport opened, closed, or scheduled a retry.
Type Literal
{ id: string; k: "doc"; n: string; replicas: number; }
An inbound CRDT delta was dispatched to the local replicas of one document. replicas: 0 means the delta arrived for a document this client does not have open and was dropped — invisible on the wire, and the usual explanation for "my document stopped updating".