Explore the intricacies of code instrumentation in this 40-minute PyCon US talk. Dive into the Python import system and discover useful design patterns for instrumenting code. Examine real-world examples and challenging instrumentation cases from popular Python libraries. Learn about proxies, wrapt, async programming, and web server specifications. Gain insights into making your code instrumentation-friendly and understand the design patterns that facilitate or complicate the process. Follow the journey through various topics including MELT (Metrics, Events, Logs, Traces), context managers, attribute mapping, class method wrapping, import hooks, WSGI transaction naming, coroutines in async frameworks, and more. Uncover solutions to common instrumentation problems and leave with a deeper understanding of how instrumentation works to enhance developer productivity.
Instrumentation Nightmares - A Review of Our Toughest Cases