SDKClient

Traces

SDK reference for traces — Find execution traces and read their spans.

Find execution traces and read their spans.

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

export.list

List trace-export destinations for a project (no secret values)

GET

Usage:

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

Input:

ParameterTypeRequiredDescription
projectIdstringYes

export.get

Fetch one trace-export destination (no secret values), or null

GET

Usage:

const result = await swirls.client.traces.export.get({
  projectId: '...',
  id: '...',
})

Input:

ParameterTypeRequiredDescription
projectIdstringYes
idstringYes

export.create

Create a trace-export destination. Validates the endpoint, encrypts credentials, sets status=pending. Requires the trace_export entitlement.

POST

Usage:

const result = await swirls.client.traces.export.create({
  projectId: '...',
  vendor: '...',
  endpoint: '...',
})

Input:

ParameterTypeRequiredDescription
projectIdstringYes
vendor"datadog" | "honeycomb" | "grafana_tempo" | "newrelic" | "neatlogs" | "otlp_generic"Yes
protocol"otlp_grpc" | "otlp_http"No
endpointstringYes
headerTemplateobjectNo
contentPolicy"full" | "redacted"No
samplingRationumberNo
secretsobjectNo

Output:

FieldTypeDescription
idstring
projectIdstring
enabledboolean
vendor"datadog" | "honeycomb" | "grafana_tempo" | "newrelic" | "neatlogs" | "otlp_generic"
protocol"otlp_grpc" | "otlp_http"
endpointstring
headerTemplateobject
contentPolicy"full" | "redacted"
samplingRationumber
status"pending" | "active" | "error" | "disabled"
configuredSecretHeadersstring[]
credentialsConfiguredboolean
lastExportAtstring | null
lastErrorstring | null
updatedAtstring

export.update

Update a trace-export destination. Re-validates the endpoint and re-encrypts supplied credentials; sets status=pending.

POST

Usage:

const result = await swirls.client.traces.export.update({
  projectId: '...',
  id: '...',
})

Input:

ParameterTypeRequiredDescription
projectIdstringYes
idstringYes
vendor"datadog" | "honeycomb" | "grafana_tempo" | "newrelic" | "neatlogs" | "otlp_generic"No
protocol"otlp_grpc" | "otlp_http"No
endpointstringNo
headerTemplateobjectNo
contentPolicy"full" | "redacted"No
samplingRationumberNo
secretsobjectNo

Output:

FieldTypeDescription
idstring
projectIdstring
enabledboolean
vendor"datadog" | "honeycomb" | "grafana_tempo" | "newrelic" | "neatlogs" | "otlp_generic"
protocol"otlp_grpc" | "otlp_http"
endpointstring
headerTemplateobject
contentPolicy"full" | "redacted"
samplingRationumber
status"pending" | "active" | "error" | "disabled"
configuredSecretHeadersstring[]
credentialsConfiguredboolean
lastExportAtstring | null
lastErrorstring | null
updatedAtstring

export.delete

Delete a trace-export destination

POST

Usage:

const result = await swirls.client.traces.export.delete({
  projectId: '...',
  id: '...',
})

Input:

ParameterTypeRequiredDescription
projectIdstringYes
idstringYes

Output:

FieldTypeDescription
deletedboolean

export.setEnabled

Enable or disable a destination. Enabling requires the trace_export entitlement and records an audited affirmation that trace data will be sent to the vendor.

POST

Usage:

const result = await swirls.client.traces.export.setEnabled({
  projectId: '...',
  id: '...',
  enabled: true,
})

Input:

ParameterTypeRequiredDescription
projectIdstringYes
idstringYes
enabledbooleanYes

Output:

FieldTypeDescription
idstring
projectIdstring
enabledboolean
vendor"datadog" | "honeycomb" | "grafana_tempo" | "newrelic" | "neatlogs" | "otlp_generic"
protocol"otlp_grpc" | "otlp_http"
endpointstring
headerTemplateobject
contentPolicy"full" | "redacted"
samplingRationumber
status"pending" | "active" | "error" | "disabled"
configuredSecretHeadersstring[]
credentialsConfiguredboolean
lastExportAtstring | null
lastErrorstring | null
updatedAtstring

export.sendTestSpan

Send one synthetic OTLP span to the destination endpoint out of band, validating reachability and credentials. Never sends real trace data.

POST

Usage:

const result = await swirls.client.traces.export.sendTestSpan({
  projectId: '...',
  id: '...',
})

Input:

ParameterTypeRequiredDescription
projectIdstringYes
idstringYes

Output:

FieldTypeDescription
deliveredboolean
statusnumber
errorstring

On this page