Time travel debugging for your production application.

Record the execution of your live application with negligible impact on performance.

Capture a detailed trace of all interactions, data flows, and operations. This trace is then used to recreate the execution path, allowing for deterministic debugging sessions.

Python
half life
Getting Started with Record-Replay

Implement our Record-Replay library in any Python application in just five minutes.
With a few lines of code you can start recording your application's interactions and replaying them for detailed analysis. Here's how to get started:

Step 1: Set Up Your Environment

To begin using Retrace, you'll need to set some environment variables in your project directory. Open a terminal and run the following commands:

bash
export PYTHONPATH="<path-to-retrace-record-replay>:$PYTHONPATH"
export RETRACE_CONFIG="<path-to-retrace-record-replay>/spec.json"
export RETRACE_MODE=record
export RETRACE_VERBOSE=1
export RETRACE_TRACE_DIR="<path-to-retrace-record-replay>/retrace"

These variables configure Retrace's behavior and specify the location of important files. Don't worry about memorizing them – you can easily copy and paste these commands to get up and running quickly.

Step 2: Start Recording

With the environment variables set, you're ready to start recording your application. Simply use the command you normally use to start your application. For example, if you're using Django, run:

bash
python manage.py runserver

Retrace will now capture all interactions and save them for later replay.

Step 3: Replay Your Recorded Session

When you're ready to replay a recorded session, it's just as simple. Use the following command:

bash
python retracereplay RETRACE_TRACE_DIR="<path-to-retrace-record-replay>/retrace"

Replace your_execution_id with the ID of the trace you want to replay. Retrace will read the recorded data from the specified trace directory and reproduce the application's execution, providing detailed logs along the way.
That's it! With these three easy steps, you can harness the power of Retrace's Record-Replay functionality to streamline your debugging and testing process. Say goodbye to time-consuming bug hunts and hello to efficient, reproducible debugging sessions.

Why Record-Replay?

Reproducibility

Capture and replay specific execution paths, making it easy to reproduce and analyze bugs.

Collaboration

Share recorded sessions with team members, facilitating collaboration and knowledge sharing.

Time travelling debugging

Step forward and backward through your application's execution, gaining deep insights into its behavior.

Efficiency

Save time and effort by quickly reproducing issues and focusing on the root cause.

Use cases

Retrace’s Record-replay library allows you to easily reproduce issues. Here are some of the scenarios where this is useful:

Software is not running as expected in a client’s environment and you can not recreate the issue.

Troubleshoot hard to find bugs.

A security breach.

Performance issues from a memory leak.

How does it work?

Tracefile

During the recording phase, Retrace generates a tracefile that encapsulates all the necessary information about the application's execution. This tracefile serves as the foundation for the replay feature, enabling developers to step through their program's execution as if it were happening live.

Custom Proxy System

Retrace employs a custom proxy system to handle and replicate the behaviour of external and internal calls within the application, ensuring accuracy and determinism in the replayed execution. This innovative approach allows Retrace to mirror the application's behaviour without getting slowed down by the complexities of underlying implementations.
Tested frameworks and libraries

Our aim is for the Record-Replay library to work seamlessly with a wide range of Python frameworks, servers, and versions.

We have tested Record-Replay with Python 3.11, Flask, Django. You can find an up to date list of tested frameworks and libraries here.

About us

Retrace is a technology company based in London, UK. Our mission is to bring end to end data visibility through applications and databases, transforming business transparency.

Recent Blog posts