# PEP 669: Low Impact Monitoring for CPython

**URL:** <https://discuss.python.org/t/pep-669-low-impact-monitoring-for-cpython/13018>\
**Category:** PEPs\
**Created:** [January 10, 2022, 3:31pm UTC](https://discuss.python.org/t/pep-669-low-impact-monitoring-for-cpython/13018 "2022-01-10T15:31:08Z")\
**Posts on this page:** 1\
**Showing post:** 82

<div class="post-metadata">

**Author:** ![P403n1x87](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/p403n1x87/32/6016_2.png) [@P403n1x87](https://discuss.python.org/u/P403n1x87)\
**Post date:** [December 1, 2025, 4:14pm UTC](https://discuss.python.org/t/pep-669-low-impact-monitoring-for-cpython/13018/82 "2025-12-01T16:14:54Z")

</div>

Is there a fundamental reason why an event such as `PY_UNWIND` is not available as a local event? The `PY_RETURN` event is somewhat incomplete as it doesn’t allow trapping the more general event of exiting from a function (be it with a result or with an exception). Having `PY_UNWIND` as a local event would make this more complete. For a more concrete use-case, one might be interested in “wrapping” around a specific function to react to when the function is entered (to report e.g. invocation arguments) and then exited (to grab either the return value or any exceptions that might have been thrown, plus the state of the frame locals).

---

_[View the full topic](https://discuss.python.org/t/pep-669-low-impact-monitoring-for-cpython/13018)._
