SWIRLS_
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:

ParameterTypeRequiredDescription
projectIdstringYes
limitnumberNo
beforeTimestampstringNo

getTrace

Fetch every span in a trace, scoped to the project

GET

Usage:

const result = await swirls.client.traces.getTrace({
  projectId: '...',
  traceId: '...',
})

Input:

ParameterTypeRequiredDescription
projectIdstringYes
traceIdstringYes

getExecutionSpans

Fetch the spans for one execution id

GET

Usage:

const result = await swirls.client.traces.getExecutionSpans({
  projectId: '...',
  executionId: '...',
})

Input:

ParameterTypeRequiredDescription
projectIdstringYes
executionIdstringYes

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:

ParameterTypeRequiredDescription
projectIdstringYes
executionIdstringYes

Output:

FieldTypeDescription
traceIdstring | null

On this page