AI / Apache Burr Interview questions
When should you write a custom hook instead of relying on with_tracker?
with_tracker(...) already gives you Burr’s own step-by-step logging and the Burr UI dashboard for free, so for standard debugging and monitoring within Burr’s own tooling, it is usually all you need.
Write a custom hook when you need to route information somewhere the tracker doesn’t reach: pushing traces into an external system like Datadog, synchronizing state to a separate database on every step, adding an artificial delay so a demo UI can render each step visibly, or putting results on a queue for a downstream monitoring pipeline. Because hooks and the tracker are independent, additive constructs, you can register a custom hook alongside with_tracker(...) rather than choosing one or the other.
A good rule of thumb: reach for with_tracker first, and only add a hook when you have a concrete integration or side effect the tracker’s built-in logging can’t produce.
More Related questions...