Skip to main content
foglamp(config?) accepts the following options. Every field is optional, and the same options apply to the v4–v6 entry point — wrap(ai, config) takes them all, plus a wrap-time context (see wrap).

Options

The ingest contract caps any single input or output field at 1,000,000 characters. maxPayloadChars (default 100,000) truncates earlier so payloads stay small — raise it only if you need fuller logs and can afford the bytes. A value above 1,000,000 is silently clamped to the contract cap.

Privacy: dropping prompt/response text

To record traces, costs, and latency without ever sending prompt or completion text, disable capture:
Token usage and cost are still computed — they come from the provider’s usage report, not from the text.

Error handling

The collector never throws into your application path. Transport or serialization failures are routed to onError (if provided) or swallowed. Enable debug to trace batching and flush behavior during development.