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 LangfuseOperations and AsyncLangfuseOperations beans 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 LangfuseApi directly 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-opentelemetry is on the classpath, automatically exports AI-related spans to Langfuse via OTLP. Zero configuration needed with DevServices.

Installation

Add the io.quarkiverse.aitelemetry:quarkus-ai-telemetry-langfuse extension to your build file.

Maven

<dependency>
    <groupId>io.quarkiverse.aitelemetry</groupId>
    <artifactId>quarkus-ai-telemetry-langfuse</artifactId>
    <version>0.10.0</version>
</dependency>

Gradle

implementation 'io.quarkiverse.aitelemetry:quarkus-ai-telemetry-langfuse:0.10.0'

Next Steps