Concepts

Traces

A trace is a single logged LLM call — the observability counterpart to an evaluation result, captured from a running application rather than a test run.

Fields

FieldDescription
modelWhich model served the request.
prompt / completionThe exact request and response text.
inputTokens / outputTokensToken counts, used to compute cost.
latencyMsEnd-to-end time for the call.
costUsdEstimated cost, derived from token counts and a per-model rate.
statussuccess or error.
spansA breakdown of the call into named phases with their own timing.

Spans

Spans split a trace into phases — typically retrieve_context, llm_generate, and postprocess — each with a start offset and duration. The trace detail page renders these as a timeline, which is usually the fastest way to see where time is actually being spent in a slow call.

Traces vs. evaluation results

Evaluation results are scored against a golden answer you already know. Traces are raw production calls with no ground truth attached — that's what Annotations is for: attaching a human judgment to a trace after the fact.

Reading a timeline

A typical trace's time goes almost entirely into llm_generate retrieve_context and postprocess are usually tens of milliseconds versus seconds for generation. When that ratio flips (retrieval taking a large share of total time), that's the signal to look at your retrieval layer rather than the model or prompt.

Where cost comes from

costUsd isn't a flat rate — it's computed per trace from inputTokens and outputTokens at a fixed per-token rate, the same way real provider billing works. A trace with a short prompt but a long, rambling completion costs more than its latency alone would suggest, since output tokens are priced higher than input tokens.

Metadata

Every trace carries a free-form metadata object — in the seed data that's environment, userId, and route. Nothing about the shape is enforced by the schema; a real integration would put whatever tags matter for your own filtering here (tenant id, feature flag, deployment region, and so on).