Skip to navigation

Ingest traces (OTLP)

Accepts OTLP/HTTP JSON or protobuf. The span fields accepted by POST /api/request-logs/ are not valid here. The Sample two-span trace example creates a workflow root span and one chat child span. Before rerunning it, replace traceId and spanId with new 32-hex and 16-hex IDs to create a separate trace.

For SDK setup, see the Tracing quickstart or the OpenTelemetry integration, which configures the exporter automatically.

Authentication

AuthorizationBearer

Use your Respan API key for Respan API authentication. Enter only the Respan API key value; clients send Authorization: Bearer <RESPAN_API_KEY>. For /api/responses, provider credentials such as Perplexity, OpenAI, or Azure OpenAI go in Settings -> Providers or respan_params.credential_override in the request body, not in this authentication field.

Request

This endpoint expects an object.
resourceSpanslist of objectsRequired

Array of resource spans. Each element represents spans from a single resource (service).

Response

Spans accepted.
partialSuccessobjectOptional

Errors

400
Bad Request Error
403
Forbidden Error