CourseAgentic AI Engineer: The Complete Course · Module 14: Observability and Debugging · part 80 of 97
Part 80 · Module 14: Observability and Debugging

Lab: Traces, replay and alerts for every run

41 min read·13 Oct 2026
Module 14 · Lab · About 80 minutes · Needs: the Module 3 lab's tools.py, lessons 1 (tracing, cost, logs, OpenTelemetry) and 2 (replay, diffs, alerts)

What you are building

RETURNS_DESK AFTER MODULE 14 model decides run_traced a span per step call tools.py BrightCart simulated spans log JSON Lines replay free, exact diff, alerts run ids OTel export any viewer
Your new code (blue) records every step between the model (amber) and Module 3's unchanged door (grey), and the same spans feed the log, replay, alerts and any trace viewer.

It is Monday 22 June 2026, week 11 (simulated). Dev's prompt change for tomorrow is ready and will skip the eval gate; trace it before it ships. This lab moves both lessons' code into returns_desk/tracing.py: Lesson 1's tracer around Module 5's loop, with tokens, cost and time per span, the JSON Lines log, Lesson 2's replay, first divergence, diff and alerts, and an OpenTelemetry exporter. Tool calls still go through Module 3's call. You follow Aisha's R-1001, then her kettle request, R-1003, under tomorrow's change. Everything is simulated.

The rest of this course is yours to keep

This course is bought on its own, once, and stays readable afterwards, including the parts added to it later.