Skip to main content

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 gives you unified observability for agents built on the Vercel AI SDK — cost, latency, token usage, distributed traces, and full prompt/response logs — with two lines of code. It is TypeScript-only and built for AI SDK v7. You instrument your app with foglamp, and traces stream to a backend you can run yourself or use as a hosted service.
Foglamp targets AI SDK v7 (currently in beta). The SDK hooks into v7’s first-class telemetry interface — see the Quickstart for version requirements.

Why Foglamp

Generative apps fail in ways traditional APM never had to model: a single user action fans out into multiple model calls, tool executions, and retries, each with its own cost and latency. Foglamp is built around that shape.

Cost at ingest

Every span is priced as it arrives, broken down by input, output, reasoning, and cached tokens. Unknown models surface as , never a misleading $0.

Distributed traces

One top-level generateText/streamText call is a trace; its steps and tool calls are spans. Group them into agents, workflows, and runs.

Latency & TTFT

p50/p95/p99 latency and time-to-first-token, read straight from the SDK’s own performance metrics rather than guessed.

Self-host or hosted

Run the whole stack with docker compose up, or point the SDK at a managed endpoint. Same code either way.

How it fits together

your app ──foglamp──▶ ingest API ──▶ ClickHouse ──▶ dashboard
  • SDK — a telemetry integration that batches spans and flushes them fire-and-forget. Silent no-op when no API key is set; never throws, never adds latency to your model calls.
  • Ingest API — authenticates the API key, prices each span, and writes to ClickHouse.
  • Dashboard — traces, workflows, agents, cost-over-time, and alerts.

Next steps

Quickstart

Install the SDK and see your first trace in minutes.

Data model

Understand traces, spans, workflows, runs, and sessions.

SDK reference

Every configuration option and integration method.

Self-hosting

Run the full stack on your own infrastructure.