Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yiblet/inquest
Inquest lets you add log statements to python without restarting your python instance. It helps you quickly uncover what is going wrong.
https://github.com/yiblet/inquest
development-tools python python3
Last synced: 13 days ago
JSON representation
Inquest lets you add log statements to python without restarting your python instance. It helps you quickly uncover what is going wrong.
- Host: GitHub
- URL: https://github.com/yiblet/inquest
- Owner: yiblet
- License: lgpl-3.0
- Archived: true
- Created: 2020-06-26T18:42:25.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-24T03:16:26.000Z (almost 2 years ago)
- Last Synced: 2024-08-01T22:58:28.853Z (3 months ago)
- Topics: development-tools, python, python3
- Language: TypeScript
- Homepage: https://inquest.dev
- Size: 5.47 MB
- Stars: 132
- Watchers: 3
- Forks: 3
- Open Issues: 34
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# What's Inquest?
Inquest is a logging tool for python programs. It let's you add logs to your running python programs without restarting the program, redeploying the program, or modifying the code in any way. Inquest takes extremely low overhead: the part that's a python library is completely idle unless there is something to log. Inquest is specifically designed to enable you to quickly introspect into Python even in production environments.
Here's a gif of the magic. I'm running a single python instance in the background and I use Inquest to dynamically add log statements to the running code.
## Installation
There are two ways to use Inquest:
1. [A simple docker-compose](https://docs.inquest.dev/docs/getting_started_with_docker)
2. [The Inquest Cloud](https://inquest.dev)## Resources
- [Documentation](https://docs.inquest.dev/docs/overview)
- [Troubleshooting](https://docs.inquest.dev/docs/logs_dont_appear)
- [Slack Group](https://join.slack.com/t/inquestcommunity/shared_invite/zt-fq7lra68-nems8~EkICvgf6xRW_J3eg)
- [Bug Tracker](https://github.com/yiblet/inquest/issues)## Frequently Asked Questions
### How does Inquest work?
Inquest works by bytecode injection. The library sets up a connection with the backend. When you add a new
log statment on the dashboard, the backend relays that change the connected python instance. Inside python,
inquest finds the affected functions inside the VM.Then it uses the python interpreter to recompile a newly generated piece of python bytecode with the new
log statements inserted. Then inquest pointer-swaps the new bytecode with the old bytecode.This has 4 benefits:
1. your underlying code object is never modified
2. reverting a log statement is always possible and will always result in code behavior identical to the original
3. it generates extremely efficient python
4. it has not overhead### Why can't I edit the code in the dashboard?
The dashboard right now cannot persist changes to the files. So modifications to the file on the dashboard
wouldn't have been reflected on the underlying file. This opens up an avenue for gotchas where you unintetionally change the IDE but never see those changes in your VCS. In order to avoid that, we made things, simple. The code viewer is read-only.