Documentation Index
Fetch the complete documentation index at: https://docs.foglamp.dev/llms.txt
Use this file to discover all available pages before exploring further.
foglamp(config?) accepts the following options. Every field is optional.
Options
| Option | Type | Default | Description |
|---|---|---|---|
apiKey | string | FOGLAMP_API_KEY | Your fl_… key. Unset → collector disabled. |
endpoint | string | https://ingest.foglamp.dev/ingest | Ingest URL. Set when self-hosting. |
flushIntervalMs | number | 5000 | How often the batch is flushed in long-running runtimes. |
maxBatchTraces | number | 50 | Flush early once this many traces are buffered. |
maxBatchSpans | number | 500 | Flush early once this many spans are buffered. |
maxPayloadChars | number | 100_000 | Per-field cap for input/output; longer values are truncated. |
recordInputs | boolean | true | Capture prompt/input text. |
recordOutputs | boolean | true | Capture completion/output text. |
waitUntil | function | auto-detected | Serverless flush hook — see Runtimes. |
fetch | function | global fetch | Custom fetch implementation. |
debug | boolean | false | Log batching/flush activity. |
onError | function | — | Called on transport/serialization errors instead of throwing. |
Privacy: dropping prompt/response text
To record traces, costs, and latency without ever sending prompt or completion text, disable capture:Error handling
The collector never throws into your application path. Transport or serialization failures are routed toonError (if provided) or swallowed.
Enable debug to trace batching and flush behavior during development.