List
client.telemetry.logs.list(LogListParams { direction, limit, branch_ids, 4 more } query, RequestOptionsoptions?): LogListResponse { data, links }
/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
Returns
import ValTown from "npm:@valtown/sdk";
const client = new ValTown();
const logs = await client.telemetry.logs.list({ direction: 'asc', limit: 1 });
console.log(logs.data);
{
"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"
}
}Returns Examples
{
"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"
}
}