Concept Document
A specialized multi-agent system that routes work across complementary models: Anthropic Claude for planning and building, and an OpenAI v6 Daybreak-class model for rigorous review.
Langfuse provides excellent LLM-specific tracing, evaluations, and prompt management. It does not natively export Prometheus metrics. This SOP covers practical ways to add operational metrics (latency, request rate, errors, tokens, cost) and visualize them in Grafana, while keeping Langfuse as the source of truth for detailed traces.
Three complementary approaches are supported:
- Custom
prometheus_clientinstrumentation via LangChain callbacks (recommended primary path). - OpenTelemetry traces →
span_metricsconnector in an OpenTelemetry Collector → Prometheus. - Direct SQL queries against Langfuse’s backing databases (Postgres / ClickHouse) from Grafana.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CREATE TABLE accounts( | |
| id serial PRIMARY KEY, | |
| name VARCHAR(256) NOT NULL | |
| ); | |
| CREATE TABLE entries( | |
| id serial PRIMARY KEY, | |
| description VARCHAR(1024) NOT NULL, | |
| amount NUMERIC(20, 2) NOT NULL CHECK (amount > 0.0), | |
| -- Every entry is a credit to one account... |