Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/robusta-dev/debug-toolkit
A modern code-injection framework for Python. Like Pyrasite but Kubernetes-aware.
https://github.com/robusta-dev/debug-toolkit
Last synced: about 2 months ago
JSON representation
A modern code-injection framework for Python. Like Pyrasite but Kubernetes-aware.
- Host: GitHub
- URL: https://github.com/robusta-dev/debug-toolkit
- Owner: robusta-dev
- License: mit
- Created: 2021-06-24T10:23:04.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-15T14:42:50.000Z (3 months ago)
- Last Synced: 2024-10-24T07:34:03.516Z (2 months ago)
- Language: Python
- Homepage: http://robusta.dev/
- Size: 46.9 KB
- Stars: 58
- Watchers: 7
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-opensource-israel - Debug Toolkit - A modern code-injection framework for Python. Like Pyrasite but Kubernetes-aware. ![GitHub last commit](https://img.shields.io/github/last-commit/robusta-dev/debug-toolkit?style=flat-square) ![GitHub top language](https://img.shields.io/github/languages/top/robusta-dev/debug-toolkit?style=flat-square) (Projects by main language / python)
README
# TL;DR
A modern code-injection framework for Python + useful utilities.This is like [Pyrasite](https://github.com/lmacken/pyrasite) but without the bugs and Kubernetes-aware.
This powers many [Robusta](http://robusta.dev/) features. You should probably use Robusta instead of using this directly.
# Overview
This repo contains source code for the docker container that powers the following [Robusta](http://robusta.dev/) features:1. Inject code into Python apps
2. [Attach a VSCode debugger to any Python application running on Kubernetes](https://docs.robusta.dev/master/catalog/actions/python-troubleshooting.html#python-debugger) - this works by injecting [debugpy](https://github.com/microsoft/debugpy/)
3. [Profile cpu and memory usage of Python apps](https://docs.robusta.dev/master/catalog/actions/python-troubleshooting.html#python-profiler) - this works by wrapping PySpy (for CPU) and by injecting the `tracemalloc` library into the target process (for memory)
4. List processes in any pod (not just Python)
Essentially, it is two things:
1. A [Pyrasite](https://github.com/lmacken/pyrasite) replacement that fixes deadlocks and other issues.
2. A Docker container containing that Pyrasite replacement, which is used by Robusta to troubleshoot and debug containers# Adding new python injection payloads
1. Add a new payload in src/debug_toolkit/payloads
1. Make sure ALL of your code is inside the `entrypoint` function, even imports. Errors are not handled or reported for code outside of the entrypoint.
2. Add a wrapper command in src/debug_toolkit/main.py# Releasing a new version
1. Bump the version in pyproject.toml
2. Run the following, replacing "v4" with the tag of the new release.```
skaffold build --tag v4
```That is all. We're not pushing versions to pypi right now.