Production-Safe Record-Replay for Python.
pip install retracesoftware
no code changes, minimal overhead.
PREVIEW RELEASE: Python 3.11 only | Apache 2.0
Backed by Preston-Werner Ventures
retrace
# Interactive demo launching next week
leave your email to be the first to try it
leave your email to be the first to try it
One line install
Pip-install.
Production safe
Python level capture
Minimal Overhead
Optimised C. See benchmarks.
Deterministic Replay
Exact reproduction
VSCode Integration
Time-travel debugging
Debug Anything
Every thread, every call
Quick Start
bash
# Install Retrace
pip install retrace
# Set environment variables for recording
export PYTHONPATH="/path/to/ your/project/"
export RETRACE_MODE="record"
pip install retrace
# Set environment variables for recording
export PYTHONPATH="/path/to/ your/project/"
export RETRACE_MODE="record"
python
# Run your application with Retrace recording
python your_app.py
python your_app.py
bash
# Set environment variables for replay
export PYTHONPATH="/path/to/ your/project/"
export RETRACE_MODE="replay"
python retrace_replay.py
export PYTHONPATH="/path/to/ your/project/"
export RETRACE_MODE="replay"
python retrace_replay.py
Q&A Section
Getting started
Is it hard to set up?
No. It’s a pip‑install agent — enable with an env var, run your app, and you’re recording. No code changes.
Do I need to change my code?
No. Retrace attaches at the Python runtime level (custom C proxy) and works with your existing app.
What Python versions work?
Our preview is Python 3.11 only, with Django/Flask and 60+ popular libraries tested. In a few months we will also have Retrace working with 3.9, 3.10 and 3.12.
Production Concerns
Can I run Retrace safely in production?
Yes. Retrace is designed for production: it records deterministically at the Python runtime layer (not ptrace/libc) — the first known prod‑safe approach of its class.
How much overhead does it add?
Measured latency overhead is under ~2% on Django/Flask workloads.
How does Retrace handle sensitive data?
Retrace records I/O; you control trace files. For stricter environments we support on‑prem deployment.
How It’s Different
How is this different from logging or APM tools?
Logs/APM show symptoms and depend on developers remembering to instrument; they can be incomplete and don’t let you step the program backward. Retrace gives you a deterministic replay of the exact execution so you can inspect the real code path and state.
Can it catch race conditions and flaky tests?
Yes. Retrace captures thread/signal interactions and replays them deterministically, so you can reproduce timing‑sensitive failures and step through them.
Open Source & Community
Is it really open source?
Yes. The Record‑Replay core is open source and released under an Apache 2.0 licence.
Why is this a preview release?
We’re opening the OSS agent early to gather installs/feedback while we finalise broader Python version and library coverage, and production hardening before GA.
How can I contribute?
Star the repo, try pip install retrace, file issues/PRs on GitHub, and use the forum for Q&A. Good first issues: library compatibility reports, minimal repros of failures, docs/examples improvements.
How does it work?
During the recording phase, Retrace captures all I/O interactions and the program’s structure, storing everything needed to enable deterministic replay.
Using a custom proxy system, Retrace ensures that the program can be re-executed with the recorded I/O, faithfully reproducing its original behavior.
Your Production App
running normally
running normally
Bug happens
Retrace captures it
Retrace captures it
Debug Locally
Replay in VSCode
Replay in VSCode
Use cases
Perfect for:
- Reproduce elusive prod-only bugs locally, even if logs are missing.
- Understanding complex code flows
- Stabilise flaky tests by replaying exact CI runs.
- Post-incident debugging
- Race conditions and timing issues
Open Source
Star & Contribute
Community Discussion
Get help, share ideas
Documentation
Complete guides
Report Bugs
Help us improve
Ready to catch every bug?
Join the future of Python debugging (Preview Release - Python 3.11 only)