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
Configuring retention
Retention settings are configured per workspace in Settings → Retention Policy:
| Setting | Default | Range |
|---|---|---|
| Trace retention (days) | 90 | 1 – 3,650 |
| Audit log retention (days) | 365 | 1 – 3,650 |
| Deletion schedule | After grace period | Immediate or after grace |
| Storage profile | Standard | Standard 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:
- Generate an audit or cost report for the period
- Export trace data in CSV, JSON, or JSON-LD format
- Store exports in your organization's archival system
This ensures compliance evidence is preserved even after operational records are purged.