Install
Set the API key
Get an API key from the Boundary dashboard. The SDK readsBOUNDARY_API_KEY from the environment by default.
Wire a logger to your contract
Run a contract
accept() produces one event at the end of the run. The event is queued, batched, and shipped to Boundary’s ingest endpoint.
What gets sent
The SDK’s default capture policy is conservative. On a successful run you’ll see roughly:input and output are not included unless you opt in — see Capture policy.
Dev-safe by default
IfBOUNDARY_API_KEY is not set and you don’t pass a custom write, createBoundaryLogger returns null. Passing null to defineContract is a no-op — the contract runs normally, no events sent, no errors.
Next steps
Capture policy
Turn raw inputs/outputs on or off
Redaction
Scrub PII before events leave the process
Shutdown
Drain the queue on serverless / edge / workers
createBoundaryLogger
Every option, with defaults