Asked about Seeing what the system did

What would you log on every model call?

An answer that works

A run id to tie the run together, the step and turn, model, input and output tokens, cached tokens, cost, latency and stop reason. For tools, the name, arguments, success, error and result size.

Reading an answer is not being able to give one. The section that teaches this is Seeing what the system did, 4 hours of Tracing & observability.

Learn this properly