Agentic-RAG-Platform

ADR-007: OpenTelemetry + Langfuse (not LangSmith)

Context

We need end-to-end tracing of every RAG query: classify → plan → retrieve → rerank → generate → validate. We also need metrics (latency, cost, failure rate) and structured logs.

Problem

Choose an observability backend: LangSmith, Langfuse, or a custom OpenTelemetry stack.

Options considered

Option A: LangSmith (LangChain’s hosted offering)

Option B: Langfuse (self-hosted)

Option C: Custom OpenTelemetry + Jaeger

Decision

Option B: Langfuse (self-hosted), with OpenTelemetry as the wire protocol.

Rationale

Trade-offs

Consequences

What happens if this component fails?

How would we replace it later?