Skip to main content
POST
/
logs
/
span
Create span log
curl --request POST \
  --url https://api.adaline.ai/v2/logs/span \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "projectId": "<string>",
  "span": {
    "startedAt": 17450965800000,
    "endedAt": 17450965800000,
    "name": "<string>",
    "status": "success",
    "content": {
      "type": "Model",
      "provider": "<string>",
      "model": "<string>",
      "input": "<string>",
      "output": "<string>",
      "variables": {
        "name": "<string>",
        "value": {
          "modality": "text",
          "value": "<string>"
        }
      },
      "cost": 1
    },
    "traceId": "<string>",
    "traceReferenceId": "<string>",
    "promptId": "<string>",
    "deploymentId": "<string>",
    "runEvaluation": true,
    "parentReferenceId": "<string>",
    "referenceId": "<string>",
    "sessionId": "<string>",
    "attributes": {},
    "tags": [
      "<string>"
    ]
  }
}
'
{
  "spanId": "<string>"
}

Authorizations

Authorization
string
header
required

Workspace API key. Pass as Authorization: Bearer <key>.

Body

application/json

Request payload for creating a new span within an existing trace.

projectId
string
required

The unique identifier of the project.

Required string length: 20 - 80
span
Create Log Span Request Span · object
required

Span data for creating a new span linked to an existing trace

Response

Span log created successfully.

Response containing created span ID for tracking in observability system.

spanId
string
required

The unique identifier of the span created in Adaline.

Required string length: 20 - 80