Archived traces
Open a trace whose spans have aged out of hot storage by loading it from the encrypted archive on demand.
axonpush keeps events in two tiers. Hot storage backs lists, search and analytics for a limited number of days. The archive keeps the same records encrypted in object storage for longer, so you can still open an old trace after it has dropped out of the trace list.
Both windows depend on your plan and archive policy. GET /organization
reports them as hotRetentionDays and archiveRetentionDays.
Archived traces are read one at a time, by trace ID. They do not appear in
GET /traces, trace groups, event search or analytics.
In the dashboard
Open the trace’s link as usual (from an alert, an error, a saved URL or a teammate). When the trace is only in the archive, the trace page shows Loading from archive with progress, then renders the trace like any other. If the history has passed archive retention you see History deleted.
From the API
Reading an archived trace is three steps: start a fetch, wait for it, read the result.
1. Detect that the trace is archived
GET /traces/{traceId} answers 404 with errors[].value set to ARCHIVED
when no hot spans remain but the archive holds the trace:
{
"status": 404,
"detail": "This trace is in the archive.",
"errors": [{ "location": "archive", "message": "ARCHIVED", "value": "ARCHIVED" }]
}Branch on errors[].value, never on the human-readable text. A plain
404 without that value means the trace does not exist or you cannot see it.
2. Start the fetch and poll it
POST /traces/{traceId}/archive-fetch returns 202 with a job:
{ "jobId": "afetch_...", "state": "queued", "segments": 2 }Poll GET /archive-fetches/{jobId} until state is ready. The response
includes segmentsDone out of segments for progress and retryAfterMs, the
suggested wait before the next poll (0 once the job has finished).
| State | Meaning |
|---|---|
queued, running | Still loading. Poll again after retryAfterMs. |
ready | Read the trace in step 3. |
failed | error says why. Start a new fetch to retry. |
gone | The history was erased or has expired. |
Starting a fetch is idempotent while a job is live: calling it again for the
same trace returns the same job. If another caller with the same visibility
already loaded the trace recently, the new job starts out ready.
3. Read the spans
GET /traces/{traceId}/archived returns the same shape as GET /traces/{traceId},
with archived: true and origin: "archive" on every span. It pages the same
way, with limit (max 500) and cursor.
JOB=$(curl -s -X POST "https://api.axonpush.xyz/traces/$TRACE_ID/archive-fetch" \
-H "X-API-Key: $AXONPUSH_API_KEY" | jq -r .jobId)
until [ "$(curl -s "https://api.axonpush.xyz/archive-fetches/$JOB" \
-H "X-API-Key: $AXONPUSH_API_KEY" | jq -r .state)" = ready ]; do sleep 1; done
curl -s "https://api.axonpush.xyz/traces/$TRACE_ID/archived" \
-H "X-API-Key: $AXONPUSH_API_KEY"The Python and TypeScript SDK facades do not wrap the archive operations yet.
Call the HTTP API directly, or use the MCP tools traces_archiveFetch,
archive_fetchStatus and traces_getArchived.
Errors to handle
| Status | errors[].value | When |
|---|---|---|
404 | Not archived, not visible to you, or the archive is not enabled on this deployment | |
409 | NOT_READY | You read /archived before the fetch reached ready |
410 | GONE | The history has been deleted (retention or erasure) |
503 | The archive is busy. Retry after the Retry-After header (5 seconds). On a deployment without archive storage configured, archive fetches also answer 503. |
Limits and visibility
- A loaded trace stays readable for 15 minutes. After that, start a new fetch.
- One fetch can load at most 12 archive segments and 20,000 events. A larger trace fails with “This trace spans too much history to load at once”.
- Fetch jobs older than 24 hours are cleaned up.
- Visibility is the same as for hot reads: an API key bound to an app or
environment only finds archived traces in that scope. The fetch needs
observe:read. - Content rules are the same as for hot traces. Without content permission,
spans come back with
contentState: "restricted". Every span whose content is returned is recorded as a content read before it is sent. If that record cannot be written, the read fails with503rather than returning unaudited content. - Erasing a subject (see Sessions) also removes their records from what the archive returns.
Related
- Traces
- Sessions, single-event content reads also fall back to the archive
- Audit, archive retention, legal holds and evidence
- API:
traces.archiveFetch,archive.fetchStatus,traces.getArchived