Skip to main content
PATCH
/
traces
/
{trace_id}
/
spans
/
{span_id}
Update Span
curl --request PATCH \
  --url https://api.pandaprobe.com/traces/{trace_id}/spans/{span_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "kind": "AGENT",
  "status": "UNSET",
  "input": null,
  "output": null,
  "model": "<string>",
  "token_usage": {},
  "metadata": {},
  "ended_at": "2023-11-07T05:31:56Z",
  "error": "<string>",
  "completion_start_time": "2023-11-07T05:31:56Z",
  "model_parameters": {},
  "cost": {}
}
'
{
  "span_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "trace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "parent_span_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "kind": "AGENT",
  "status": "UNSET",
  "input": null,
  "output": null,
  "model": "<string>",
  "token_usage": {},
  "metadata": {},
  "started_at": "<string>",
  "ended_at": "<string>",
  "error": "<string>",
  "completion_start_time": "<string>",
  "model_parameters": {},
  "cost": {},
  "latency_ms": 123,
  "time_to_first_token_ms": 123
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

trace_id
string<uuid>
required
span_id
string<uuid>
required

Body

application/json

Partial-update schema for a span (all fields optional).

name
string | null
Maximum string length: 512
kind
enum<string> | null

Categorises what a span represents in an agentic workflow.

Available options:
AGENT,
TOOL,
LLM,
RETRIEVER,
CHAIN,
EMBEDDING,
OTHER
status
enum<string> | null

Mirrors the OTel StatusCode for a span's outcome.

Available options:
UNSET,
OK,
ERROR
input
unknown
output
unknown
model
string | null
Maximum string length: 255
token_usage
Token Usage · object
metadata
Metadata · object
ended_at
string<date-time> | null
error
string | null
completion_start_time
string<date-time> | null
model_parameters
Model Parameters · object
cost
Cost · object

Response

Successful Response

Public span representation.

span_id
string<uuid>
required
trace_id
string<uuid>
required
parent_span_id
string<uuid> | null
required
name
string
required
kind
enum<string>
required

Categorises what a span represents in an agentic workflow.

Available options:
AGENT,
TOOL,
LLM,
RETRIEVER,
CHAIN,
EMBEDDING,
OTHER
status
enum<string>
required

Mirrors the OTel StatusCode for a span's outcome.

Available options:
UNSET,
OK,
ERROR
input
unknown
required
output
unknown
required
model
string | null
required
token_usage
Token Usage · object
required
metadata
Metadata · object
required
started_at
string
required
ended_at
string | null
required
error
string | null
required
completion_start_time
string | null
required
model_parameters
Model Parameters · object
required
cost
Cost · object
required
latency_ms
number | null
time_to_first_token_ms
number | null