ReferenceSDKClient
traces
SDK reference for traces —
listExecutions
List recent executions and agent sessions for a project
GET
Usage:
const result = await swirls.client.traces.listExecutions({
projectId: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | |
limit | number | No | |
beforeTimestamp | string | No |
getTrace
Fetch every span in a trace, scoped to the project
GET
Usage:
const result = await swirls.client.traces.getTrace({
projectId: '...',
traceId: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | |
traceId | string | Yes |
getExecutionSpans
Fetch the spans for one execution id
GET
Usage:
const result = await swirls.client.traces.getExecutionSpans({
projectId: '...',
executionId: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | |
executionId | string | Yes |
resolveExecutionTrace
Resolve the trace id an execution id belongs to (e.g. a parent run)
GET
Usage:
const result = await swirls.client.traces.resolveExecutionTrace({
projectId: '...',
executionId: '...',
})Input:
| Parameter | Type | Required | Description |
|---|---|---|---|
projectId | string | Yes | |
executionId | string | Yes |
Output:
| Field | Type | Description |
|---|---|---|
traceId | string | null |