Description
In this session, we will explore event monitoring, which provides the capability to trace Python code execution. There are various situations where understanding the flow of function execution is essential during development, such as debugging, profiling, and coverage testing. These capabilities can be implemented based on Python’s event system. We will first review how these features have been traditionally implemented, and then explain how, in more recent versions of Python (3.12 and above), they can be implemented with improved performance. Throughout the session, we will demonstrate this by building a simple Python function tracing tool.