List
List
client.telemetry.logs.list(LogListParamsquery, RequestOptionsoptions?): dataarraylinksPaginationLinksLogListResponse
get/v1/telemetry/logs
Get OpenTelemetry logs 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. Filter additionally by branch_ids or file_id.
Parameters
querydirectionunionlimitnumberbranch_idsarrayendstringfile_idstringstartstringtrace_idsarrayLogListParams
Returns
LogListResponse
A paginated result set
import ValTown from '@valtown/sdk';
const client = new ValTown();
const logs = await client.telemetry.logs.list({ direction: 'asc', limit: 1 });
console.log(logs.data);
200 Example
{
"data": [
{
"attributes": [
{
"key": "key",
"value": {
"arrayValue": {},
"boolValue": true,
"bytesValue": "bytesValue",
"doubleValue": 0,
"intValue": "intValue",
"kvlistValue": {},
"stringValue": "stringValue"
}
}
],
"body": {
"arrayValue": {},
"boolValue": true,
"bytesValue": "bytesValue",
"doubleValue": 0,
"intValue": "intValue",
"kvlistValue": {},
"stringValue": "stringValue"
},
"severityText": "severityText",
"timeUnixNano": "timeUnixNano",
"traceId": "traceId"
}
],
"links": {
"self": "https://example.com",
"next": "https://example.com",
"prev": "https://example.com"
}
}