Langfuse
This is the Langfuse provider of Quarkus AI Telemetry. It is a Quarkus extension for Langfuse, the open-source LLM engineering platform, and provides a type-safe REST client generated from the Langfuse OpenAPI specification, Dev Services for zero-config local development, and a Dev UI card for quick access to the Langfuse dashboard.
What is Langfuse?
Langfuse is an open-source LLM engineering platform that helps teams collaboratively debug, analyze, and iterate on their LLM applications. It provides:
-
Observability - Capture comprehensive traces covering LLM and non-LLM calls, including retrieval, embedding, API calls, and more. Track multi-turn conversations and multi-step agentic workflows with sessions. Surface quality, cost, and latency metrics at a glance.
-
Prompt management - Manage, version, and optimize prompts throughout development. Deploy prompts to production or other environments without any code changes. Compare latency, cost, and evaluation metrics across different versions.
-
Evaluation - Attach numeric, boolean, or categorical evaluation scores to traces. Create dataset collections for systematic testing. Run LLM-as-a-judge evaluations on production or development traces.
Features
This extension integrates Langfuse into the Quarkus ecosystem with the following features:
-
Type-safe Langfuse API client - Synchronous and asynchronous clients covering the full Langfuse public API (traces, prompts, scores, datasets, observations, skills, and more), built on the Quarkus REST Client Reactive.
-
Higher-level API operations - Curated
LangfuseOperationsandAsyncLangfuseOperationsbeans over seventeen domains, offering lookup by id or name, existence checks, filtered views, lazy pagination, idempotent initialization and batch deletes that report an outcome per identifier. See Higher-Level API Operations. -
CDI integration - Inject
LangfuseApidirectly into your beans. No Quarkus-specific types needed. -
DevServices - Automatically starts a complete Langfuse stack (Langfuse server, PostgreSQL, ClickHouse, Redis, MinIO, and Worker) in dev and test mode using Testcontainers. No manual setup required.
-
Dev UI - Provides a Dev UI card with a direct link to the Langfuse dashboard running in your local DevServices instance.
-
Native image support - Compatible with GraalVM native image compilation.
-
OpenTelemetry integration - When
quarkus-opentelemetryis on the classpath, automatically exports AI-related spans to Langfuse via OTLP. Zero configuration needed with DevServices.
Installation
Next Steps
-
Configuration and Usage - connect to Langfuse and inject the clients.
-
Higher-Level API Operations - lookups, filters, pagination and batch deletes.
-
OpenTelemetry Integration - export AI spans to Langfuse.
-
Dev Services, Dev UI and Debugging - develop and test without setting up Langfuse.
-
Compatibility - supported Langfuse, Quarkus and Java versions.
-
Migrating from quarkus-langfuse - upgrade from 0.10.0 and earlier with an OpenRewrite recipe.