← Table of Contents · Page 294 of 868

TRACING AND SPANS

Part 8 of 10

EXAMPLES Example 1: One span One call to a search tool is one span. It records the start time, end time, the query, and the results returned. Example 2: A complete trace A model call, a tool call, another model call, another tool call, and a final model call together answered one question. Those five spans form the trace for that request. Example 3: Finding the bottleneck A trace took nine seconds in total. The third span, a database query, took eight of those seconds. The engineer knows to speed up the query, not change the model. Example 4: Pinpointing an error A span is marked as an error, with the message "ConnectionTimeout after 5000ms". The engineer sees exactly which step failed without running the whole request again. PRACTICE LAB CONNECTION Add spans and traces to the Resume Review Agent lab in Chapter 68. Test the prompts below against the trace data you produce.
Advertisement
Read Aloud:
0:00 / 0:00