v51

latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-01105276529.8 KB
spans

Create spans

Submit spans to be inserted into a project. If any spans are invalid or duplicates, no spans will be inserted.

post/v1/projects/{project_identifier}/spans

Path parameters

project_identifierstring required

The project identifier: either project ID or project name. If using a project name, it cannot contain slash (/), question mark (?), or pound sign (#) characters.

The project identifier: either project ID or project name. If using a project name, it cannot contain slash (/), question mark (?), or pound sign (#) characters.

Request body

Example request

{
  "data": [
    {
      "attributes": {
        "llm.model_name": "gpt-4",
        "llm.token_count.completion": 50,
        "llm.token_count.prompt": 100
      },
      "context": {
        "span_id": "1a2b3c4d5e6f7a8b",
        "trace_id": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4"
      },
      "end_time": "2024-01-01T12:00:01Z",
      "events": [],
      "name": "llm_call",
      "span_kind": "LLM",
      "start_time": "2024-01-01T12:00:00Z",
      "status_code": "OK",
      "status_message": ""
    }
  ]
}

Response

Successful Response

total_receivedinteger required

Total number of spans received

total_queuedinteger required

Number of spans successfully queued for insertion