Skip to content
  • Auto
  • Light
  • Dark
Get Started
View as Markdown
Copy Markdown

Open in Claude
Open in ChatGPT

List

client.telemetry.traces.list(TraceListParams { direction, limit, branch_ids, 4 more } query, RequestOptionsoptions?): TraceListResponse { data, links }
get/v1/telemetry/traces

Get OpenTelemetry traces within a specified time window with flexible pagination options: Pass in only the end time to paginate backwards from there. Pass in a start time to paginate backwards from now until the start time. Pass in both to get resources within the time window. Choose to return in end_time order instead to view traces that completed in a window or since a time. Filter additionally by branch_ids or file_id.

ParametersExpand Collapse
query: TraceListParams { direction, limit, branch_ids, 4 more }
direction: "asc" | "desc"

Sort direction for the traces. Defaults to descending order of timestamp.

Accepts one of the following:
"asc"
"desc"
limit: number

Maximum items to return in each paginated response

minimum1
maximum100
branch_ids?: Array<string>

Branch IDs to filter by

end?: string

End date of the time window (latest time)

formatdate-time
file_id?: string

Include only resources from a given file identified by its ID

formatuuid
order_by?: "start_time" | "end_time"

When set to end_time, traces are sorted by their end time, and pending traces are omitted. When set to start_time, all traces are included, with pending traces given "0" for their end time.

Accepts one of the following:
"start_time"
"end_time"
start?: string

Start date of the time window (earliest time)

formatdate-time
ReturnsExpand Collapse
TraceListResponse { data, links }

A paginated result set

data: Array<Data>
attributes: Array<Attribute>
key: string
value: Value { arrayValue, boolValue, bytesValue, 4 more }
arrayValue?: unknown
boolValue?: boolean
bytesValue?: string
doubleValue?: number
intValue?: string
kvlistValue?: unknown
stringValue?: string
endTimeUnixNano: string

0 if trace is unfinished

name: string
startTimeUnixNano: string
status: Status { code, message }
code: number
message: string
traceId: string

Links to use for pagination

URL of this page

formaturi

URL of the next page, if any

formaturi

URL of the previous page, if any

formaturi
import ValTown from "npm:@valtown/sdk";

const client = new ValTown();

const traces = await client.telemetry.traces.list({ direction: 'asc', limit: 1 });

console.log(traces.data);
{
  "data": [
    {
      "attributes": [
        {
          "key": "key",
          "value": {
            "arrayValue": {},
            "boolValue": true,
            "bytesValue": "bytesValue",
            "doubleValue": 0,
            "intValue": "intValue",
            "kvlistValue": {},
            "stringValue": "stringValue"
          }
        }
      ],
      "endTimeUnixNano": "endTimeUnixNano",
      "name": "name",
      "startTimeUnixNano": "startTimeUnixNano",
      "status": {
        "code": 0,
        "message": "message"
      },
      "traceId": "traceId"
    }
  ],
  "links": {
    "self": "https://example.com",
    "next": "https://example.com",
    "prev": "https://example.com"
  }
}
Returns Examples
{
  "data": [
    {
      "attributes": [
        {
          "key": "key",
          "value": {
            "arrayValue": {},
            "boolValue": true,
            "bytesValue": "bytesValue",
            "doubleValue": 0,
            "intValue": "intValue",
            "kvlistValue": {},
            "stringValue": "stringValue"
          }
        }
      ],
      "endTimeUnixNano": "endTimeUnixNano",
      "name": "name",
      "startTimeUnixNano": "startTimeUnixNano",
      "status": {
        "code": 0,
        "message": "message"
      },
      "traceId": "traceId"
    }
  ],
  "links": {
    "self": "https://example.com",
    "next": "https://example.com",
    "prev": "https://example.com"
  }
}