Low-overhead streaming (or continuous) OpenTracing-compatible Python profiler.
Documentation | https://gauge.readthedocs.io/en/stable/ |
Issue tracker | https://github.com/AndreiPashkin/gauge/issues/ |
Repository | https://github.com/AndreiPashkin/gauge/ |
The idea is to make a profiler which would be able to continuously stream the profile data to monitoring software (like Jaeger or Elastic APM) and also, have low-performance overhead so that it would be possible to deploy it on production. So it would be possible to monitor the performance of a microservice or some other long-running application in real-time over a long period and explore historical performance data.
Currently, no open-source alternatives exist that are able to do that.
- OpenTracing compatibility.
Specifically with the following APMs:
- Elastic APM (after this fix is merged).
- Jaeger.
- Very low overhead with 100 / samples per second sampling frequency.
- Supports generators/coroutines.
Currently, the project targets only CPython 3.5+. It is intended to be compatible with all major operating systems, but currently only tested on Ubuntu Linux.
Project in alpha stage of development and is actively worked on. It just passed the state where the main functionality is working more or less correctly and it is possible to actually install it and use.
The profiler exploits _PyThread_CurrentFrames() function of CPython's C-API which provides reasonable performance. This function is called with defined frequency in a background thread which collects raw data which is in turn aggregated and exported to somewhere in another background thread which is activated with a much lower frequency.
Profiler | Is low-overhead? | Is streaming? | Is commercial? | Is Open-Source? | Has permissive license? |
---|---|---|---|---|---|
DataDog profiler | Yes | Yes | Yes | No | |
Py-Spy | Yes | No | No | Yes | Yes |
Austin | Yes | No | No | Yes | No |