Skip to content
  • Auto
  • Light
  • Dark
Get Started

List

List
client.telemetry.traces.list(TraceListParamsquery, RequestOptionsoptions?): dataarraylinksPaginationLinksTraceListResponse
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.

Parameters
querydirectionunionlimitnumberbranch_idsarrayendstringfile_idstringorder_byunionstartstringTraceListParams
Hide ParametersShow Parameters
directionunion
"asc" | "desc"

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

Hide ParametersShow Parameters
"asc"
"desc"
limitnumber

Maximum items to return in each paginated response

minimum1
maximum100
branch_idsarray
optional
Array<string>

Branch IDs to filter by

endstring
optional

End date of the time window (latest time)

formatdate-time
file_idstring
optional

Include only resources from a given file identified by its ID

formatuuid
order_byunion
optional
"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.

Hide ParametersShow Parameters
"start_time"
"end_time"
startstring
optional

Start date of the time window (earliest time)

formatdate-time
Returns
TraceListResponse

A paginated result set

Hide ParametersShow Parameters
dataarray
Array<Data>
Hide ParametersShow Parameters
attributesarray
Array<Attribute>
Hide ParametersShow Parameters
keystring
valuearrayValueunknownboolValuebooleanbytesValuestringdoubleValuenumberintValuestringkvlistValueunknownstringValuestringValue
Hide ParametersShow Parameters
arrayValueunknown
optional
boolValueboolean
optional
bytesValuestring
optional
doubleValuenumber
optional
intValuestring
optional
kvlistValueunknown
optional
stringValuestring
optional
endTimeUnixNanostring

0 if trace is unfinished

namestring
startTimeUnixNanostring
statuscodenumbermessagestringStatus
Hide ParametersShow Parameters
codenumber
messagestring
traceIdstring
import ValTown from '@valtown/sdk';

const client = new ValTown();

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

console.log(traces.data);
200 Example
{
  "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"
  }
}