Skip to content
Get started

List traces (root spans)

client.traces.list(TraceListParams { agent, duration_ns__gte, duration_ns__lte, 22 more } query?, RequestOptionsoptions?): TraceListResponse { count, results, next, previous }
GET/api/traces/

Returns one row per trace — the root span (parent_span_id IS NULL) of each trace the caller can see.

ParametersExpand Collapse
query: TraceListParams { agent, duration_ns__gte, duration_ns__lte, 22 more }
agent?: string
formatuuid
duration_ns__gte?: number
duration_ns__lte?: number
has_error?: boolean
iteration?: string
formatuuid
job?: string
formatuuid
kind?: number
max_duration_ms?: number
min_duration_ms?: number
name?: string
operation?: string
ordering?: string

Which field to use when ordering the results.

page?: number

A page number within the paginated result set.

project?: string
formatuuid
received_at__gte?: string
formatdate-time
received_at__lte?: string
formatdate-time
service_name?: string
service_name__in?: Array<string>

Multiple values may be separated by commas.

span_id?: string
span_type?: "llm_call" | "tool_call"
  • llm_call - Llm Call
  • tool_call - Tool Call
Accepts one of the following:
"llm_call"
"tool_call"
start_time_ns__gte?: number
start_time_ns__lte?: number
status_code?: number
trace_id?: string
ReturnsExpand Collapse
TraceListResponse { count, results, next, previous }
count: number
results: Array<Result>
agent: string | null
formatuuid
duration_ns: number
end_time_ns: number
iteration: string | null
formatuuid
job: string | null
formatuuid
kind: number
name: string
operation: string
project: string
formatuuid
received_at: string
formatdate-time
service_name: string
span_id: string
span_type: "llm_call" | "tool_call"
  • llm_call - Llm Call
  • tool_call - Tool Call
Accepts one of the following:
"llm_call"
"tool_call"
start_time_ns: number
status_code: number
status_message: string
trace_id: string
List traces (root spans)
import OvermindLab from 'overmind-lab';

const client = new OvermindLab();

const traces = await client.traces.list();

console.log(traces.count);
{
  "count": 123,
  "results": [
    {
      "agent": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "duration_ns": 0,
      "end_time_ns": 0,
      "iteration": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "job": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "kind": 0,
      "name": "name",
      "operation": "operation",
      "project": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "received_at": "2019-12-27T18:11:19.117Z",
      "service_name": "service_name",
      "span_id": "span_id",
      "span_type": "llm_call",
      "start_time_ns": 0,
      "status_code": 0,
      "status_message": "status_message",
      "trace_id": "trace_id"
    }
  ],
  "next": "http://api.example.org/accounts/?page=4",
  "previous": "http://api.example.org/accounts/?page=2"
}
Returns Examples
{
  "count": 123,
  "results": [
    {
      "agent": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "duration_ns": 0,
      "end_time_ns": 0,
      "iteration": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "job": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "kind": 0,
      "name": "name",
      "operation": "operation",
      "project": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "received_at": "2019-12-27T18:11:19.117Z",
      "service_name": "service_name",
      "span_id": "span_id",
      "span_type": "llm_call",
      "start_time_ns": 0,
      "status_code": 0,
      "status_message": "status_message",
      "trace_id": "trace_id"
    }
  ],
  "next": "http://api.example.org/accounts/?page=4",
  "previous": "http://api.example.org/accounts/?page=2"
}