Skip to main content

Module model

Module model 

Source
Expand description

Wire types for the Langfuse ingestion API.

Corresponds to POST /api/public/ingestion. The request body is { "batch": [ <event>, ... ] }, where each event is an envelope: { id, type, timestamp, body }.

  • The envelope id is used for deduplication (unique per request).
  • body.id is the real trace / observation id (same id with different envelope id = update).
  • All fields use camelCase (#[serde(rename_all = "camelCase")]).

Data model mirrors https://langfuse.com/docs/observability/data-model.

We only cover the event types and fields needed for ingestion; the full Langfuse schema is wider. Unused fields are omitted (skip_serializing_if = "Option::is_none").

Structs§

IngestionBatch
The body of an ingestion request.
IngestionError
A single failure result. Fields are intentionally lenient — only used for diagnostic logging; unknown fields are ignored.
IngestionEvent
A single event envelope. type is the oneOf discriminator; body varies by type.
IngestionResponse
Response body for the ingestion endpoint.
IngestionSuccess
A single successful ingestion result.
ObservationBody
Body of an observation (generation / span).
TraceBody
Body for a trace (shared by trace-create and update).

Enums§

EventKind
Discriminant for ingestion event types.
ObservationLevel
The level of an observation, determining UI state coloring and filtering.