Skip to content

Spans

Create Span
client.spans.create(SpanCreateParams { name, start_time, trace_id, 7 more } body, RequestOptionsoptions?): Span { id, name, start_time, 7 more }
POST/spans
List Spans
client.spans.list(SpanListParams { limit, order_by, order_direction, 3 more } query?, RequestOptionsoptions?): SpanListResponse { id, name, start_time, 7 more }
GET/spans
Partial Update Span
client.spans.update(stringspanID, SpanUpdateParams { data, end_time, input, 6 more } body, RequestOptionsoptions?): Span { id, name, start_time, 7 more }
PATCH/spans/{span_id}
Get Span
client.spans.retrieve(stringspanID, RequestOptionsoptions?): Span { id, name, start_time, 7 more }
GET/spans/{span_id}
ModelsExpand Collapse
Span { id, name, start_time, 7 more }
id: string
name: string

Name that describes what operation this span represents

start_time: string

The time the span started

formatdate-time
trace_id: string

Unique identifier for the trace this span belongs to

data?: Record<string, unknown> | Array<Record<string, unknown>> | null

Any additional metadata or context for the span

One of the following:
Record<string, unknown>
Array<Record<string, unknown>>
end_time?: string | null

The time the span ended

formatdate-time
input?: Record<string, unknown> | Array<Record<string, unknown>> | null

Input parameters or data for the operation

One of the following:
Record<string, unknown>
Array<Record<string, unknown>>
output?: Record<string, unknown> | Array<Record<string, unknown>> | null

Output data resulting from the operation

One of the following:
Record<string, unknown>
Array<Record<string, unknown>>
parent_id?: string | null

ID of the parent span if this is a child span in a trace

task_id?: string | null

ID of the task this span belongs to

SpanListResponse = Array<Span { id, name, start_time, 7 more } >
id: string
name: string

Name that describes what operation this span represents

start_time: string

The time the span started

formatdate-time
trace_id: string

Unique identifier for the trace this span belongs to

data?: Record<string, unknown> | Array<Record<string, unknown>> | null

Any additional metadata or context for the span

One of the following:
Record<string, unknown>
Array<Record<string, unknown>>
end_time?: string | null

The time the span ended

formatdate-time
input?: Record<string, unknown> | Array<Record<string, unknown>> | null

Input parameters or data for the operation

One of the following:
Record<string, unknown>
Array<Record<string, unknown>>
output?: Record<string, unknown> | Array<Record<string, unknown>> | null

Output data resulting from the operation

One of the following:
Record<string, unknown>
Array<Record<string, unknown>>
parent_id?: string | null

ID of the parent span if this is a child span in a trace

task_id?: string | null

ID of the task this span belongs to