OpenAI Agents
- Response spans: A streamed Responses call records the model, the system instructions, the output messages, the tools, and the request settings from the response object.
- History roles: Tool calls and reasoning items are recorded as assistant messages. Tool results are recorded as tool messages. A message that already has a role keeps it.
- Reply text: The trace output and the model span store the reply text. A streamed response with no
output_textstill yields that text, and encrypted reasoning stays out of the preview. - Agent spans: Agent, task, and turn spans record the input and output of their own child model calls when the span itself has none.
- Prompt once: The OpenAI Agents span snapshot no longer repeats the input history or the response message body already stored on the span.
LangChain
- Root output: Reasoning content blocks become the answer string on the root trace output. The generation span keeps the full block list. Tool-call payloads stay unchanged.
- Empty results: A successful non-root chain or tool that returns
Noneends with{"result": "none"}. Root traces and errors are unchanged.
Tracing
- Before send:
before_sendcan redact or drop an ingest payload without a custom HTTP transport. - Payload cap:
max_payload_bytescaps the payload.deduplicate_span_contentshrinks repeated history before the cap is applied.
LangChain
- Span filter:
exclude_span_namesandinclude_spandrop spans, including noisy LangGraph middleware, while children stay attached to the nearest kept ancestor. - Model name: When a chat model is not serializable, the handler reads
ls_model_namefrom run metadata after invocation params.
Ingest
- User-Agent: A custom
transportsendsuselemma-tracing/<version>unless you setUser-Agentyourself.
Tracing
- One turn, two processes: start_turn,
attach_turn, andapplyrecord a host and a sandbox as one trace. The child keeps a journal and does not call ingest. The host sends once.turn.end()still raises on failure.
Ingest
- Fail open:
trace(),async_trace(), andTraceHandle.end()catch HTTP and network errors, log them, and do not rethrow. ingest() still raises. A delivery failure does not replace your agent’s error.
Generations
- Token usage: LangChain and OpenAI Agents record token usage, including cache and reasoning tokens from Agents SDK details.
- Provider: Generation spans set the provider system from the model provider.
Tracing
- Release: Pass
releaseto the client, or setLEMMA_RELEASE, to stamp the running revision on each trace. - Provenance: Spans record the SDK language and integration so missing usage is distinct from a real zero.
Tool calls
- User-facing text: Set
user_facing_messagewhen a tool sends text directly to the person. Lemma shows that text as the message they received.
OpenAI Agents
- Trace contract: The processor records current-turn input and output, terminal errors, and span-bounded times. Soft tool errors are included.
LangChain
- Trace contract: Owned runs keep current-turn input, output, and errors. Tool calls stay nested under one root until the final answer. LangGraph uses the LangChain adapter.