Fictura
Errors & traces
POST/v1/traces

Traces

Send spans over standard OTLP/HTTP, from any OpenTelemetry exporter, to the Performance page.

The React Native, Node and Python SDKs send their spans here. Any OTLP/HTTP exporter can do the same. /api/v1/traces is the same route.

Authorization

x-api-key carries your SDK app key. A missing or unknown key answers the usual 401.

Body

An OTLP ExportTraceServiceRequest, as application/json or application/x-protobuf, plain or gzip. Any other content type answers 415.

  • Up to 5 MB after gzip is inflated, and 5,000 spans per request.
  • A span is rejected when its ids or times can't be read, when it runs over 24 hours, when it repeats a span in the request, or when it starts outside the 30-day retention window or more than an hour ahead, or when the app is over its daily span quota (200,000 by default; the response says how many were refused).
  • Query strings are cut from URLs, and prompt and completion text is dropped. Values that look like secrets are scrubbed before anything is stored.
cURL
curl -X POST https://api.fictura.co/v1/traces \
  -H "x-api-key: gk_..." \
  -H "Content-Type: application/json" \
  -d '{"resourceSpans":[{"resource":{"attributes":[{"key":"service.name","value":{"stringValue":"api"}}]},"scopeSpans":[{"spans":[{"traceId":"5b8efff798038103d269b633813fc60c","spanId":"eee19b7ec3c1b174","name":"GET /generate","startTimeUnixNano":"1791796443000000000","endTimeUnixNano":"1791796443250000000"}]}]}]}'

Response

This route answers in OTLP's format, not with ok. A protobuf request gets a protobuf answer.

200 — application/json
{
  "partialSuccess": {
    "rejectedSpans": 1,
    "errorMessage": "1 span rejected: start time out of range (1)"
  }
}

Errors are {"code": <status>, "message": "…"}: 400 for a body that is not an OTLP export, 413 over the size cap, 415 for a content type or encoding it can't read. Over 30,000 spans a minute per app, the export answers 429 with Retry-After; OTLP exporters retry on it.

On this page