Example
Parameters
Galtea inference result ID to link traces to. When provided, the wrapper manages the Galtea trace context automatically for the duration of the block.
Span name for the observation.
Langfuse observation type:
span (default), generation, agent, tool, retriever, chain, evaluator, embedding, guardrail. Mapped to Galtea’s TraceType automatically. See observation types.start_as_current_observation.
Yields
A Langfuse observation span object. Supports all native Langfuse span methods:Update observation attributes (
output, model, metadata, etc.).Create a child observation. Child calls are native Langfuse — no Galtea wrapper needed.
Attach a score to this observation.
Nested Observations
Only the root call needs the Galtea wrapper. Child observations created viaroot.start_as_current_observation(...) are native Langfuse — they are automatically linked to Galtea while the root context is active.