Skip to main content
POST
/
logs
/
trace
Create trace log
curl --request POST \
  --url https://api.adaline.ai/v2/logs/trace \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "projectId": "<string>",
  "trace": {
    "startedAt": 17450965800000,
    "name": "<string>",
    "status": "success",
    "endedAt": 17450965800000,
    "referenceId": "<string>",
    "sessionId": "<string>",
    "attributes": {},
    "tags": [
      "<string>"
    ]
  },
  "spans": [
    {
      "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
      },
      "promptId": "<string>",
      "deploymentId": "<string>",
      "runEvaluation": true,
      "parentReferenceId": "<string>",
      "referenceId": "<string>",
      "sessionId": "<string>",
      "attributes": {},
      "tags": [
        "<string>"
      ]
    }
  ]
}
'
{
  "traceId": "<string>",
  "spanIds": [
    "<string>"
  ]
}

Authorizations

Authorization
string
header
required

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

Body

application/json

Request payload for creating a new trace with optional child spans for LLM observability.

projectId
string
required

The unique identifier of the project.

Required string length: 20 - 80
trace
Create Log Trace Request Trace · object
required

Trace data for creating a new execution trace in observability system

spans
Create Log Trace Request Span · object[] | null
Minimum array length: 1

Response

Trace created successfully.

Response containing created trace and span IDs for tracking in observability system.

traceId
string
required

The unique identifier of the trace created in Adaline.

Required string length: 20 - 80
spanIds
string[]
required

The unique identifier of the span created in Adaline.

Required string length: 20 - 80