Docs
Trace Replay

Trace Replay

Replay historical traces for debugging, verification, and cross-dataset analysis.

Trace Replay lets you reconstruct and re-execute any previously captured trace. This is useful for debugging regressions, validating model updates, and performing batch verification across historical data.

Each replayed trace is linked to its original source and stored with its own integrity hash for verification.


Replay workflow

Rendering diagram...

Replaying a single trace

API

curl -X POST https://api.aitracer.app/api/replay/traces \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"traceId": "tra_abc123"}'

Response

{
  "traceId": "tra_abc123_replay_1752000000000",
  "replayedAt": "2026-07-04T15:30:00Z",
  "sourceTraceId": "tra_abc123",
  "input": {
    "prompt": "Summarize this quarterly report",
    "model": "gpt-4o",
    "parameters": { "temperature": 0.2 }
  },
  "verification": {
    "replayHash": "a1b2c3d4...",
    "matchOriginal": true,
    "originalHash": "a1b2c3d4..."
  }
}

GET endpoint

curl "https://api.aitracer.app/api/replay/traces?traceId=tra_abc123" \
  -H "Authorization: Bearer YOUR_API_KEY"

What gets replayed

When you replay a trace, AITracer:

  1. Extracts the original prompt and model parameters from the stored Decision Record
  2. Rebuilds a new Decision Record with a fresh timestamp
  3. Computes a new SHA-256 integrity hash
  4. Compares the replay hash against the original to verify integrity
  5. Stores the replayed trace with:
    • A new trace ID linked to the original
    • An audit log entry (trace.replayed)
    • Verification records showing hash comparison
    • Cost estimates based on current pricing

Use cases

Debugging regressions

When a model update changes behavior, replay historical traces against the new model to identify affected workflows before they impact users.

Verification audits

Periodically replay traces to confirm that stored integrity hashes remain valid and that no storage corruption or tampering has occurred.

Model comparison

Replay the same set of traces against different models to compare quality, cost, and latency across providers.

Compliance reviews

Replay traces from a specific time period to demonstrate to auditors that execution records remain intact and verifiable.


Batch replay

For bulk verification, you can replay traces within a date range directly from the dashboard. Each replayed trace is processed independently and logged to the audit trail.


Replay and evaluation

Combine replay with the evaluation engine to score replayed traces:

  1. Replay a historical trace
  2. Run an evaluation on the replayed trace
  3. Compare scores between the original and replayed versions

This is useful for detecting quality drift when models or prompts change.


Trace Replay – AITracer — AITracer