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.
This page is written for an AI coding agent (Claude Code, Cursor, …) asked
to add Foglamp tracing to a codebase. If you’re a human, the
Quickstart is friendlier.
Rules
- Requires AI SDK v7 (
ai@7). Foglamp builds on v7’s telemetry interface and does not support v5/v6. If the repo is on v5/v6, stop and tell the user. - Prefer the installed package’s types/README over memory. Don’t invent SDK APIs
or hand-wire ingest endpoints — only use
foglamp’s public API below. - The SDK is a silent no-op without
FOGLAMP_API_KEY— safe to add in every environment. Nothing throws and no spans are sent until the key is set. - Instrument one real entry point first, verify a trace appears, then expand.
1. Install & configure
.env
2. Wrap the AI SDK calls (per-call, recommended)
Attach the integration to eachgenerateText / streamText call via the
telemetry option. Every call needs a traceName or an agentName.
3. Map the codebase to Foglamp’s model
Inspect the app and apply these — this is what makes the dashboard useful:- Each agent (a named, reusable LLM behavior) → set
agentNameon its calls. - Multi-step pipelines (a request that fans out across several calls/agents)
→ give every call in one run a shared
workflowNameand the sameworkflowRunId(e.g. the job/request id), so they line up on the Workflows timeline.workflowNameandworkflowRunIdare passed together. - One-off calls that aren’t an agent → just give them a
traceName.

