LLM Observability
CRAFT uses two complementary observability systems that operate at different layers:- OpenTelemetry, infrastructure-level: HTTP requests, database queries, Redis, service health
- Langfuse, LLM-level: model calls, token usage, cost, prompt quality, evaluation results
Why LLM Observability Is Different
Traditional observability (metrics, traces, logs) was designed for deterministic systems. LLM-powered applications introduce unique observability challenges:What Each System Captures
OpenTelemetry (Infrastructure)
Answers: “Is the service up? Is it slow? Are there errors?”
Langfuse (LLM)
Answers: “Is the AI producing quality output? What’s it costing? Which prompt version is better?”
Architecture
Integration Pattern
The platform uses LiteLLM as a provider-agnostic LLM proxy. LiteLLM natively supports Langfuse as a callback handler, requiring no changes to application code. WhenLANGFUSE_HOST is set, LiteLLM automatically:
- Records each LLM API call to Langfuse (prompt, completion, model, tokens, cost)
- Groups calls into sessions by conversation ID
- Reports evaluation scores if evaluators are configured
Langfuse Trace Anatomy
A Langfuse trace for a Data Insights session might look like:Cost Tracking
Langfuse aggregates LLM costs across all calls, enabling:- Cost per conversation / session / user
- Cost trends over time
- Model comparison (cost vs. quality tradeoff)
- Budget alerting (configurable thresholds)
Related
Langfuse
Deploy and configure Langfuse.
OpenTelemetry
Infrastructure observability with OTel.

