promptdojo_promptdojo_promptdojo_promptdojo_promptdojo_promptdojo_promptdojo_promptdojo_promptdojo_promptdojo_promptdojo_

Structured logs and alerts — step 7 of 7

Checkpoint

One last thing before we move on. pass this to mark the lesson done, or skip and keep moving. hop to the next when you're ready.

Build the three-rule monitor: error rate (>30% alerts), slow rate (latency over 1000ms, >30% alerts), and the subtle one — score collapse: if every non-None score is IDENTICAL, print "ALERT: score distribution collapsed to a constant - model or feature pipeline broken". Print the summary line f"n={n} errors={e:.0%} slow={s:.0%}" first, then any alerts. This window's scores are all 0.7 — the model is answering, and saying nothing.

full-screen editor opens — close anytime to keep reading.