HridaSpro Docs

Api Reference

Trace Ingest

Push agent traces (OpenAI Agents SDK spans) into Spro for observability. Beta.

API console
POST/v1/traces/ingest
Bash
curl https://spro.hridaai.com/v1/traces/ingest \  -H "Content-Type: application/json" \  -H "Authorization: Bearer spro-xxxxxxxxxxxxxxxx" \  -d '{    "data": [      {        "id": "span_0196a1b2c3d4",        "trace_id": "trace_0196a1b2",        "parent_id": null,        "object": "trace.span",        "started_at": "2026-10-15T10:00:00Z",        "ended_at": "2026-10-15T10:00:02Z",        "span_data": {          "type": "generation",          "name": "chat",          "model": "gpt-oss-20b",          "input": [{"role": "user", "content": "Hello"}],          "output": "Hi there!"        }      }    ]  }'
JSON
{  "ingested": 1}

Beta

Agent trace ingestion is in beta — the ingest contract and dashboard views are still evolving.

POST https://spro.hridaai.com/v1/traces/ingest

Ingests agent trace spans so they appear in your project's observability views, stitched to the usage logs of the gateway calls they made. Built for the OpenAI Agents SDK exporter, but any client that emits the same span shape works.

Auth is a Spro API key via Authorization: Bearer. The key must be bound to a project — traces land in that project.

Request body

FieldTypeDescription
dataarrayA batch of span objects (OpenAI Agents SDK trace.span export format).

Each span:

FieldTypeDescription
idstringRequired — unique span ID. Spans without an id (and malformed entries, e.g. trace-level objects) are skipped.
trace_idstringThe trace this span belongs to.
parent_idstring or nullParent span ID, forming the span tree.
objectstringDefaults to trace.span.
started_atstringISO timestamp when the span started.
ended_atstringISO timestamp when the span ended.
errorobject or nullError attached to the span, if any.
span_dataobjectType-specific payload — type (e.g. generation, agent, tool) and name are surfaced as the span kind and name; the rest is stored as-is.

Behavior

  • Idempotent: id is unique — re-exporting an already-ingested span is a no-op, so exporters can retry or replay batches safely.
  • Stitched to usage: generation spans that made a gateway call are matched with the corresponding usage log, so cost and token usage roll up under the trace in the dashboard.
  • Batch-friendly: send many spans in one request; the response reports how many were ingested.

What's Next