Instrumentation Nightmares: A review of our toughest cases
summary
Covers techniques for instrumenting Python by hooking the import system and using tools like wrapt and proxies, with attention to async and Python web-server interfaces. Reviews design patterns that help or hinder instrumentation and walks through challenging, real-world cases from popular Python libraries to show how instrumentation is implemented and made easier.
AI-written summary · about
chapters (23)
- 0:00Intro
- 2:36Metrics Events Logs Traces (MELT)
- 5:29Context Managers
- 5:57Attribute Mapping
- 6:57Wrapping class methods
- 9:09Binding Parameters
- 9:57Hooking into the Python Import System
- 10:34Registering Import Hooks
- 14:40Example Module
- 15:50Import Ordering
- 18:54WSGI Transaction Naming
- 20:48Coroutines in Async Frameworks
- 22:07Starlette Error Instrumentation
- 23:49Deprecated Imports
- 24:33Starlette Background Tasks
- 29:19Simple Test
- 30:10In Summary
- 31:50Programming the Deepest Field Path Logic
- 33:25Double Reporting Exceptions: The Problem
- 34:17Double Reporting Exceptions: The Solution
- 36:46Adding Signals
- 37:04The Implementation of TouchUp class
- 38:59Conclusion
related talks
24mInstrument Your App with Prometheus
41mEcosystem for Reliable Python Programming
23mThe Hitchhiker's Guide to Advanced Python Monitoring
01h 30mPython Design Patterns
30mObserving Python applications with OpenTelemetry
24mPython for Humans, Designing Python Code Like a User Interface
30mAn Admin's Cornucopia - Python Is More Than Just A Better Bash
27mInstrumenting at 10 years per second
