Docs
Data Retention

Data Retention

Configure retention windows for traces and related evidence. Automatically purge expired records.

AITracer allows organizations to configure retention policies for operational records.

Retention policies help balance compliance requirements with storage costs. When records exceed the configured retention period, they are automatically purged in a scheduled cleanup process.


Configurable retention

Organizations can define retention periods for:

  • Traces — Default 90 days. Covers prompts, responses, execution metadata, and associated verification records.
  • Audit logs — Default 365 days. Covers all event logs including trace ingestion, evaluation, replay, and webhook delivery events.
  • Alerts — Only non-open alerts past the trace retention period are purged. Open alerts are preserved.

Retention workflow

Rendering diagram...

Configuring retention

Retention settings are configured per workspace in Settings → Retention Policy:

SettingDefaultRange
Trace retention (days)901 – 3,650
Audit log retention (days)3651 – 3,650
Deletion scheduleAfter grace periodImmediate or after grace
Storage profileStandardStandard or Extended

How deletion works

When traces are deleted, all associated records are removed through cascading deletion:

  • Execution records (token counts, latency, cost)
  • Verification records (integrity hashes)
  • Policy results (compliance decisions)

Audit logs and alerts are deleted independently based on their own retention periods.


Extended storage

The Extended storage profile doubles the default retention windows:

  • Traces: 180 days
  • Audit logs: 730 days (2 years)

This is suitable for organizations with stricter compliance requirements or longer audit cycles.


Before deletion

Before a retention run executes, you should export or archive any data required for long-term compliance records:

  1. Generate an audit or cost report for the period
  2. Export trace data in CSV, JSON, or JSON-LD format
  3. Store exports in your organization's archival system

This ensures compliance evidence is preserved even after operational records are purged.


Data Retention – AITracer — AITracer