feat: integrate Langfuse LLM observability via OTEL#3900
Open
crivetimihai wants to merge 20 commits intomainfrom
Open
feat: integrate Langfuse LLM observability via OTEL#3900crivetimihai wants to merge 20 commits intomainfrom
crivetimihai wants to merge 20 commits intomainfrom
Conversation
62 tasks
10 tasks
Member
Author
|
Implementation update for this branch. This PR now covers the full Langfuse observability rollout across both the Python gateway path and the Rust MCP runtime path. What changed:
Validation run on the current branch:
Latest broad suite result on this branch:
Runtime outcome:
|
Add Langfuse as an observability backend for ContextForge, receiving traces via standard OTLP/HTTP. Follows the existing Phoenix overlay pattern with a dedicated docker-compose overlay file. New files: - docker-compose.with-langfuse.yml: Complete overlay with 6 services (langfuse-web, langfuse-worker, langfuse-db, langfuse-clickhouse, langfuse-minio, langfuse-cache) using separate infrastructure to avoid coupling with ContextForge databases - docs/docs/manage/observability/langfuse.md: Full integration guide Modified files: - Makefile: 7 new targets (langfuse-up/down/status/logs/clean, langfuse-monitoring-up/down) - .env.example: Langfuse configuration section with all tunable vars - docker-compose.yml: Document Langfuse overlay in profiles header - docs/docs/manage/observability/.pages: Add to docs navigation - docs/docs/manage/observability/observability.md: Add as recommended backend option Key design decisions: - OTLP/HTTP protocol (Langfuse does not support gRPC) - Hyphenated service names (AWS S3 SDK rejects underscore hostnames) - No host port bindings for infrastructure (only UI on port 3100) - Auto-provisioned org/project/keys via LANGFUSE_INIT_* env vars - Health check uses $(hostname) (Next.js binds to container hostname) Tested with 13+ traces flowing from tool invocations and gateway health checks into Langfuse v3.162.0. Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
This was
linked to
issues
Mar 29, 2026
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
docker-compose.with-langfuse.ymloverlay with 6 services (web, worker, PostgreSQL, ClickHouse, MinIO, Redis)make langfuse-up,langfuse-down,langfuse-status,langfuse-logs,langfuse-clean,langfuse-monitoring-updocs/docs/manage/observability/langfuse.md.env.examplesection with all Langfuse configuration variablesDesign Decisions
docker-compose.with-phoenix.ymlprecedent)OTEL_EXPORTER_OTLP_PROTOCOL=httplangfuse-minionotlangfuse_minio)LANGFUSE_INIT_*env vars — works out of the boxTest plan
docker compose config --quietvalidates with Langfuse overlaydocker compose config --quiet --profile monitoringvalidates combined stackmake langfuse-status)/api/public/traces)make test-mcp-cli— 17/23 passed (5 failures pre-existing, unrelated to Langfuse)make langfuse-up/down/status/logs/cleantargets all work