BoundaryLogEvent. This is the shape that hits the network (or your custom write sink).
Full shape
Field-level reference
Identity
| Field | Set by | Notes |
|---|---|---|
contractName | Contract | The name field you passed to defineContract. Required. |
environment | Logger | From createBoundaryLogger({ environment }). Buckets data on the dashboard. |
timestamp | SDK | Stamped at emit time, not at run start. |
Run metadata
| Field | Meaning |
|---|---|
attempt | How many attempts the run took. 1 means accepted first try. |
maxAttempts | From the contract’s retry config at the time of the run. |
ok | Whether the contract accepted the output. |
durationMs | Total wall-clock time for the run including retries. |
model | Per-call contract.accept(run, { model }) override, else the logger’s default model, else undefined. |
rulesCount | Number of rules on the contract at runtime. Dashboard uses the latest seen. |
Failure details
Only present whenok: false and capture.errors is on.
| Field | Meaning |
|---|---|
category | EMPTY_RESPONSE, REFUSAL, NO_JSON, TRUNCATED, PARSE_ERROR, VALIDATION_ERROR, RULE_ERROR, or RUN_ERROR. |
issues | Schema errors or rule violations from the last failed attempt. |
Repair context
The repair messages generated from the last failed attempt. Present whenever the run ran more than one attempt andcapture.repairs is on — even on successful runs (repairs from an earlier failed attempt that the repair loop fixed).
Raw data (opt-in)
| Field | Controlled by |
|---|---|
input | capture.inputs — off by default |
output | capture.outputs — off by default |
SDK attribution
Stamped automatically. Used for attribution on the dashboard and for debugging version-specific behavior.runtime is "node/<version>" on Node, "browser" where navigator.userAgent exists, or omitted on edge runtimes (Cloudflare Workers, Vercel Edge) where neither is available.
Lifecycle
Each hop runs before the event is visible on the next. If capture strips a field, it can’t be added back bybeforeSend for that event.
Example success event
Example failure event
See also
Capture policy
Which bucket controls which field
createBoundaryLogger
Full options reference