Skip to main content

spans

Creates, updates, deletes, gets or lists a spans resource.

Overview

Namespans
TypeResource
Idaws.qconnect.spans

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
assistant_idstringUUID of the Connect AI Assistant resource (pattern: <code>[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}</code>)
attributesobjectSpan-specific contextual attributes
end_timestampstring (date-time)Operation end time in milliseconds since epoch
origin_request_idstringThe origin request identifier for end-to-end tracing.
parent_span_idstringParent span identifier for hierarchy. Null for root spans. (pattern: <code>[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}</code>)
request_idstringThe service request ID that initiated the operation (pattern: <code>[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}</code>)
session_idstringUUID of the Connect AI Session resource (pattern: <code>[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}</code>)
span_idstringUnique span identifier (pattern: <code>[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}</code>)
span_namestringService-defined operation name (pattern: <code>[a-zA-Z0-9\s_.,-]+.*</code>)
span_typestringOperation relationship type (CLIENT, SERVER, INTERNAL)
start_timestampstring (date-time)Operation start time in milliseconds since epoch
statusstringSpan completion status (OK, ERROR, TIMEOUT)
status_descriptionstringHuman-readable error description when status is ERROR or TIMEOUT

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_spansselectassistant_id, session_id, regionnextToken, maxResultsRetrieves AI agent execution traces for a session, providing granular visibility into agent orchestration flows, LLM interactions, and tool invocations.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
assistant_idstringUUID or ARN of the Connect AI Assistant resource
regionstringAWS region (default: us-east-1)
session_idstringUUID or ARN of the Connect AI Session resource
maxResultsintegerMaximum number of spans to return per page
nextTokenstringPagination token for retrieving the next page of results

SELECT examples

Retrieves AI agent execution traces for a session, providing granular visibility into agent orchestration flows, LLM interactions, and tool invocations.

SELECT
assistant_id,
attributes,
end_timestamp,
origin_request_id,
parent_span_id,
request_id,
session_id,
span_id,
span_name,
span_type,
start_timestamp,
status,
status_description
FROM aws.qconnect.spans
WHERE assistant_id = '{{ assistant_id }}' -- required
AND session_id = '{{ session_id }}' -- required
AND region = '{{ region }}' -- required
AND nextToken = '{{ nextToken }}'
AND maxResults = '{{ maxResults }}'
;