Skip to main content
foglamp(config?) accepts the options below. Every field is optional. The v4 to v6 entry point takes the same options: wrap(ai, config) accepts them all, plus a context for defaults (see wrap).

Options

The ingest API caps any single input or output field at 1,000,000 characters. maxPayloadChars (default 100,000) cuts off earlier to keep payloads small. Raise it only if you need fuller logs. Values above 1,000,000 are clamped to that cap.

Privacy: keeping text out

To record traces, cost, and timing without ever sending prompt or response text, turn capture off:
Token counts and cost still work. They come from the provider’s usage report, not from the text.

Error handling

The collector never throws into your app. Failures go to onError if you provide one, and are otherwise ignored. Turn on debug to watch batching and flushing during development.