4 ms·
Newer python versions come with what they call audit hooks, which can log events on for example file open. The open function already has such audit built in. h
by Too 5y ago
Newer python versions come with what they call audit hooks, which can log events on for example file open. The open function already has such audit built in.
https://peps.python.org/pep-0578/ https://peps.python.org/pep-0578/
It can be seen as somewhere in between home made monkey patching and strace. Strace is great, because it shows absolutely everything. But showing everything can also be too much, a pre filtered view is often what you really want.
If you want a similar tracing mechanism that spans your whole system I think you could do it with eBPF.