Documentation

Trace model and tool calls

Build a readable run timeline that connects provider requests, tool execution, retrieval, and application outcomes.

Create the parent run

Start one run for the user-visible task. Add stable application metadata such as workspace, customer, agent, feature, release, and environment.

Instrument model clients

Use a provider integration or the gateway to record model, timing, response status, and token usage. Content capture is optional and controlled separately.

Wrap tool execution

Create a child span for each tool invocation. Record the tool name, duration, status, retry count, and a safe summary of its result.

Add the outcome

End the run with an application-defined outcome such as completed, escalated, validation_failed, or cancelled. Outcome metrics make the trace useful for reliability reporting, not only debugging.

Open Trace Explorer and filter by release, model, tool, customer, or outcome to investigate production behavior.