Let's walk through recording and replaying your first trace:
Set the sampling_rate in .tusk/config.yaml to 1.0 to ensure that all requests are recorded.
Run your server in record mode using the TUSK_DRIFT_MODE environment variable:
TUSK_DRIFT_MODE=RECORD python app.pyNote: See the Environment Variables guide for more details about
TUSK_DRIFT_MODEand other environment variables.
You should see logs indicating Tusk Drift is active:
[TuskDrift] SDK initialized in RECORD mode
[TuskDrift] App marked as ready
Make a request to a simple endpoint that includes some database and/or network calls:
curl http://localhost:8000/api/test/weatherWait for a few seconds and then stop your server with Ctrl+C. This will give time for traces to be exported.
In your project directory, list the recorded traces:
tusk listYou should see an output similar to:
Press ESC to exit the list view.
Need to install the Tusk CLI? See CLI installation guide.
Replay the recorded test:
tusk runYou should see an output similar to:
Success! You've recorded and replayed your first trace.

