> ## Documentation Index
> Fetch the complete documentation index at: https://docs.apsio.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Data export

> Export a project's logs, traces and metrics as OTLP files, and load them into any OpenTelemetry collector.

An export writes one project's telemetry over a range of days as OpenTelemetry (OTLP) files
you download: the logs, spans and metrics your apps sent, in the format they sent them. Load
them into Grafana, Datadog, your own collector or anything else that reads OTLP. Exports are
free on every plan, Free included.

## Start an export

In the console, open **Settings › Data export** for the project, choose **New export**, pick
the signals and the days (UTC, as `YYYY-MM-DD`), and choose **Export**. The export runs in the
background; when its files are ready, Apsio emails you a link back to the page, and the export
shows **✓ done** in the list. Choose **Download** to see its files.

Owners and admins start and download exports; members see the page, but not the list.

| Limit | Value |
| - | - |
| Range | Up to 31 days an export. Export a longer history as several exports. |
| At a time | One export runs at a time in an organization. |
| A day | 5 exports an organization. |
| Files kept | 7 days after the export is done, then deleted. |
| Links | Each download link works for 15 minutes. Open the list again for fresh ones. |

An export reads what the console reads: your plan's [retention](/privacy-and-security#retention)
applies, so the range only holds what is still kept. Logs, spans and metrics follow the detail
retention (7 days on Free, 30 on Pro); a range that starts before it simply has nothing older.

## What an export holds

| Signal | What |
| - | - |
| Logs | Logs and events, as the SDK sent them |
| Traces | Spans: app starts, screen loads, network requests and your own |
| Metrics | Metric values and histograms, MetricKit reports included |

Crashes and hangs are exported as the log records the SDK sent; the symbolicated report the
console shows is not. Apsio's own analysis is not OTLP and is not exported either: issues,
session summaries and rollups, and session replay segments.

## The files

Each export is a set of gzipped files of newline-delimited JSON, one OTLP request per line
(`ExportLogsServiceRequest`, `ExportTraceServiceRequest` or `ExportMetricsServiceRequest`), in
the [OTLP/JSON](https://github.com/open-telemetry/opentelemetry-proto/blob/main/docs/specification.md#json-protobuf-encoding) encoding the
SDKs send. Each line holds up to 5,000 records, grouped by resource. A signal's files split
every 100 MiB of JSON before compression:

```text theme={"theme":"css-variables"}
manifest.json
logs-0001.ndjson.gz
logs-0002.ndjson.gz
traces-0001.ndjson.gz
metrics-0001.ndjson.gz
```

`manifest.json` lists the export:

```json theme={"theme":"css-variables"}
{
  "export_id": "0192f3a4-0000-7000-8000-0000000e0001",
  "project_id": "0192f3a4-0000-7000-8000-00000000b001",
  "signals": ["logs", "traces", "metrics"],
  "from": "2026-10-07T00:00:00.000Z",
  "to": "2026-10-21T00:00:00.000Z",
  "format": "One OTLP/JSON Export*ServiceRequest per line, gzipped (NDJSON).",
  "profile": "Apsio Mobile Profile for OTLP v0.1",
  "counts": { "logs": 18204, "traces": 6311, "metrics": 942 },
  "files": [
    { "signal": "logs", "name": "logs-0001.ndjson.gz", "bytes": 3407872, "records": 18204 }
  ]
}
```

`from` is inclusive and `to` exclusive; `bytes` are the compressed size.

## Load it into a collector

The OpenTelemetry Collector's
[OTLP JSON file receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/otlpjsonfilereceiver)
reads the files as they are. Point it at the directory you downloaded them to, from the start
of each file, and send them on with any exporter:

```yaml theme={"theme":"css-variables"}
receivers:
  otlp_json_file:
    include:
      - /data/apsio-export/*.ndjson.gz
    compression: gzip
    start_at: beginning

exporters:
  otlphttp:
    endpoint: https://otlp.example.com

service:
  pipelines:
    logs:
      receivers: [otlp_json_file]
      exporters: [otlphttp]
    traces:
      receivers: [otlp_json_file]
      exporters: [otlphttp]
    metrics:
      receivers: [otlp_json_file]
      exporters: [otlphttp]
```

A line holds a whole request, so it can be several megabytes; if your collector limits the
length of a line it reads, raise that limit.

Without a collector, send each line to any OTLP/HTTP endpoint that takes JSON, to the path of
its signal:

```bash theme={"theme":"css-variables"}
for f in logs-*.ndjson.gz; do
  gunzip -c "$f" | while IFS= read -r line; do
    printf '%s' "$line" | curl -sS --fail -X POST https://otlp.example.com/v1/logs \
      -H 'Content-Type: application/json' -H "Authorization: Bearer $OTLP_TOKEN" \
      --data-binary @-
  done
done
```

Use `/v1/traces` for `traces-*` files and `/v1/metrics` for `metrics-*` files, and the auth
header your endpoint asks for (most refuse a request without one).

## Who sees what

* Every export started and every set of download links handed out is in the organization's
  audit log (**Settings › Activity**), with the number of files, never a link.
* A link downloads its file without signing in, until it expires: share it as you would the
  data.
* An erasure deletes exports with the data: erasing an organization or a project deletes its
  exports' files, and erasing an app user deletes the files of every export of the project
  that may hold their data. An export running at the time is canceled.

## If an export fails

If an export cannot finish, Apsio tries again, up to three times, and then emails you that it
failed; start it again from the page.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.