- Check sampling rate: Verify your sampling rate configuration is set to 1.0 for 100% recording. The SDK checks in this order:
samplingRateinTuskDrift.initialize()(highest priority)TUSK_RECORDING_SAMPLING_RATEenvironment variable- legacy alias
TUSK_SAMPLING_RATE recording.sampling.base_ratein.tusk/config.yaml- legacy
recording.sampling_ratein.tusk/config.yaml - Default: 1.0
- Verify app readiness: Make sure you're calling
TuskDrift.markAppAsReady() - Use debug mode in SDK: Add
logLevel: 'debug'to the initialization parameters
Ensure that TuskDrift.initialize() is called before any other telemetry providers (e.g. OpenTelemetry, Sentry, etc.).
-
Enable service and CLI logs:
tusk drift run --debug
Logs will be written to
.tusk/logs/ -
Test with simple endpoint: Start with endpoints that only return static data
-
Check dependencies: Verify you're using supported package versions
-
Remove concurrency setting for slow replays: If replaying works but takes a long time (>10,000 ms), remove any
concurrencysetting from your.tusk/config.yaml(default is1). When tests run concurrently, the Node process may struggle to synchronously fetch mocks while other tests are executing. Running tests sequentially can help in these cases.