Skip to main content

Module langfuse

Module langfuse 

Source
Expand description

Langfuse integration — uploads an AgentEvent stream as Langfuse traces, generations, and spans.

Module layout:

  • model: wire types for the ingestion API.
  • ingest: buffered batching + background reporting (with optional drop degradation).
  • projector: translates AgentEvent into ingestion events.
  • observer: SessionObserver implementation that subscribes to the event stream per session.

Re-exports§

pub use ingest::IngestConfig;
pub use ingest::LangfuseIngest;
pub use observer::LangfuseObserver;
pub use projector::TraceProjector;

Modules§

ingest
Langfuse batch uploader.
model
Wire types for the Langfuse ingestion API.
observer
LangfuseObserver reports each session’s AgentEvent stream to Langfuse.
projector
Translation of AgentEvent into Langfuse ingestion events.

Structs§

LangfuseSetup
Parsed Langfuse upload parameters (credentials already validated as non-empty).

Constants§

DEFAULT_FLUSH_INTERVAL
Default periodic flush interval.
DEFAULT_HOST
Default Langfuse host.
DEFAULT_MAX_BATCH
Default maximum number of events per batch.
DEFAULT_QUEUE_CAPACITY
Inbound channel capacity (backpressure boundary; drops when full, does not backpressure the main loop).

Functions§

build_observer
Starts the reporter with a LangfuseSetup and an already-built HttpStack, returning an observer.