Skip to main content
PATCH
Update a span

Authorizations

x-api-key
string
header
required

Headers

x-selected-account-id
string | null

Path Parameters

span_id
string
required

Body

application/json
name
string | null
end_timestamp
string<date-time> | null
output
Output · object | null
metadata
Metadata · object | null
status
enum<string> | null
default:SUCCESS
Available options:
SUCCESS,
ERROR,
CANCELED

Response

Successful Response

id
string
required
name
string
required
trace_id
string
required

id for grouping traces together, uuid is recommended

Maximum string length: 256
start_timestamp
string<date-time>
required
account_id
string
required
object
string
default:span
Allowed value: "span"
created_by
Identity · object | null

The identity that created the entity.

parent_id
string | null

Reference to a parent span_id

group_id
string | null

Reference to a group_id

end_timestamp
string<date-time> | null
input
Input · object | null
output
Output · object | null
metadata
Metadata · object | null
expected
Expected · object | null
status
enum<string> | null
default:SUCCESS
Available options:
SUCCESS,
ERROR,
CANCELED
type
enum<string> | null
default:STANDALONE
Available options:
TEXT_INPUT,
TEXT_OUTPUT,
COMPLETION_INPUT,
COMPLETION,
KB_RETRIEVAL,
KB_INPUT,
RERANKING,
EXTERNAL_ENDPOINT,
PROMPT_ENGINEERING,
DOCUMENT_INPUT,
MAP_REDUCE,
DOCUMENT_SEARCH,
DOCUMENT_PROMPT,
CUSTOM,
CODE_EXECUTION,
DATA_MANIPULATION,
EVALUATION,
FILE_RETRIEVAL,
KB_ADD_CHUNK,
KB_MANAGEMENT,
GUARDRAIL,
OUTPUT_GUARDRAIL,
TRACER,
AGENT_TRACER,
AGENT_WORKFLOW,
STANDALONE
application_interaction_id
string | null

The interaction ID this span belongs to

application_variant_id
string | null

The id of the application variant this span belongs to

obs_trace_id
string | null

W3C trace id of the observability trace this span executed in. Null for spans written without the edge, and for accounts still served by the legacy trace store.

obs_span_id
string | null

W3C span id of the observability span this span executed in.

input_tokens
integer | null

Prompt tokens the producer reported for this span, absent when it reported none. Same quantity the input_tokens sort orders by.

Required range: 0 <= x <= 4294967295
output_tokens
integer | null

Completion tokens the producer reported for this span, absent when it reported none. Same quantity the output_tokens sort orders by.

Required range: 0 <= x <= 4294967295