Skip to content

/AWS1/CL_QQCSPANATTRIBUTES

Contextual attributes capturing operation details, LLM configuration, usage metrics, and conversation data

CONSTRUCTOR

IMPORTING

Optional arguments:

iv_operationname TYPE /AWS1/QQCNONEMPTYSTRING /AWS1/QQCNONEMPTYSTRING

Action being performed

iv_providername TYPE /AWS1/QQCNONEMPTYSTRING /AWS1/QQCNONEMPTYSTRING

Model provider identifier (e.g., aws.bedrock)

iv_errortype TYPE /AWS1/QQCNONEMPTYSTRING /AWS1/QQCNONEMPTYSTRING

Error classification if span failed (e.g., throttle, timeout)

iv_agentid TYPE /AWS1/QQCUUID /AWS1/QQCUUID

Amazon Connect agent ID

iv_instancearn TYPE /AWS1/QQCGENERICARN /AWS1/QQCGENERICARN

Amazon Connect instance ARN

iv_contactid TYPE /AWS1/QQCUUID /AWS1/QQCUUID

Amazon Connect contact identifier

iv_initialcontactid TYPE /AWS1/QQCUUID /AWS1/QQCUUID

Amazon Connect contact identifier

iv_sessionname TYPE /AWS1/QQCNONEMPTYSTRING /AWS1/QQCNONEMPTYSTRING

Session name

iv_aiagentarn TYPE /AWS1/QQCARNWITHQUALIFIER /AWS1/QQCARNWITHQUALIFIER

AI agent ARN

iv_aiagenttype TYPE /AWS1/QQCAIAGENTTYPE /AWS1/QQCAIAGENTTYPE

AI agent type

iv_aiagentname TYPE /AWS1/QQCNAME /AWS1/QQCNAME

AI agent name

iv_aiagentid TYPE /AWS1/QQCUUID /AWS1/QQCUUID

AI agent identifier

iv_aiagentversion TYPE /AWS1/QQCINTEGER /AWS1/QQCINTEGER

AI agent version number

iv_aiagentinvoker TYPE /AWS1/QQCNONEMPTYSTRING /AWS1/QQCNONEMPTYSTRING

Entity that invoked the AI agent

iv_aiagntorchestratorusecase TYPE /AWS1/QQCNONEMPTYSTRING /AWS1/QQCNONEMPTYSTRING

AI agent orchestrator use case

iv_requestmodel TYPE /AWS1/QQCNONEMPTYSTRING /AWS1/QQCNONEMPTYSTRING

LLM model ID for request (e.g., anthropic.claude-3-sonnet)

iv_requestmaxtokens TYPE /AWS1/QQCINTEGER /AWS1/QQCINTEGER

Maximum tokens configured for generation

iv_temperature TYPE /AWS1/RT_FLOAT_AS_STRING /AWS1/RT_FLOAT_AS_STRING

Sampling temperature for generation

iv_topp TYPE /AWS1/RT_FLOAT_AS_STRING /AWS1/RT_FLOAT_AS_STRING

Top-p sampling parameter for generation

iv_responsemodel TYPE /AWS1/QQCNONEMPTYSTRING /AWS1/QQCNONEMPTYSTRING

Actual model used for response (usually matches requestModel)

it_responsefinishreasons TYPE /AWS1/CL_QQCSPANFINISHRSNLST_W=>TT_SPANFINISHREASONLIST TT_SPANFINISHREASONLIST

Generation termination reasons (e.g., stop, max_tokens)

iv_usageinputtokens TYPE /AWS1/QQCINTEGER /AWS1/QQCINTEGER

Number of input tokens in prompt

iv_usageoutputtokens TYPE /AWS1/QQCINTEGER /AWS1/QQCINTEGER

Number of output tokens in response

iv_usagetotaltokens TYPE /AWS1/QQCINTEGER /AWS1/QQCINTEGER

Total tokens consumed (input + output)

iv_cachereadinputtokens TYPE /AWS1/QQCINTEGER /AWS1/QQCINTEGER

Number of input tokens that were retrieved from cache

iv_cachewriteinputtokens TYPE /AWS1/QQCINTEGER /AWS1/QQCINTEGER

Number of input tokens that were written to cache in this request

it_inputmessages TYPE /AWS1/CL_QQCSPANMESSAGE=>TT_SPANMESSAGELIST TT_SPANMESSAGELIST

Input message collection sent to LLM

it_outputmessages TYPE /AWS1/CL_QQCSPANMESSAGE=>TT_SPANMESSAGELIST TT_SPANMESSAGELIST

Output message collection received from LLM

it_systeminstructions TYPE /AWS1/CL_QQCSPANMESSAGEVALUE=>TT_SPANMESSAGEVALUELIST TT_SPANMESSAGEVALUELIST

System prompt instructions

iv_promptarn TYPE /AWS1/QQCARNWITHQUALIFIER /AWS1/QQCARNWITHQUALIFIER

AI prompt ARN

iv_promptid TYPE /AWS1/QQCUUID /AWS1/QQCUUID

AI prompt identifier

iv_prompttype TYPE /AWS1/QQCAIPROMPTTYPE /AWS1/QQCAIPROMPTTYPE

AI prompt type

iv_promptname TYPE /AWS1/QQCNAME /AWS1/QQCNAME

AI prompt name

iv_promptversion TYPE /AWS1/QQCINTEGER /AWS1/QQCINTEGER

AI prompt version number

iv_timetofirsttokenms TYPE /AWS1/QQCINTEGER /AWS1/QQCINTEGER

Time to first token in milliseconds, measured from when Amazon Bedrock was invoked to when the first token was returned

it_guardrailassessments TYPE /AWS1/CL_QQCSPANGDRAILASSMNT=>TT_SPANGUARDRAILASSESSMENTLIST TT_SPANGUARDRAILASSESSMENTLIST

Guardrail assessments for the inference span. Absent on other span types and when no AI Guardrail is attached to the AI Agent.


Queryable Attributes

operationName

Action being performed

Accessible with the following methods

Method Description
GET_OPERATIONNAME() Getter for OPERATIONNAME, with configurable default
ASK_OPERATIONNAME() Getter for OPERATIONNAME w/ exceptions if field has no value
HAS_OPERATIONNAME() Determine if OPERATIONNAME has a value

providerName

Model provider identifier (e.g., aws.bedrock)

Accessible with the following methods

Method Description
GET_PROVIDERNAME() Getter for PROVIDERNAME, with configurable default
ASK_PROVIDERNAME() Getter for PROVIDERNAME w/ exceptions if field has no value
HAS_PROVIDERNAME() Determine if PROVIDERNAME has a value

errorType

Error classification if span failed (e.g., throttle, timeout)

Accessible with the following methods

Method Description
GET_ERRORTYPE() Getter for ERRORTYPE, with configurable default
ASK_ERRORTYPE() Getter for ERRORTYPE w/ exceptions if field has no value
HAS_ERRORTYPE() Determine if ERRORTYPE has a value

agentId

Amazon Connect agent ID

Accessible with the following methods

Method Description
GET_AGENTID() Getter for AGENTID, with configurable default
ASK_AGENTID() Getter for AGENTID w/ exceptions if field has no value
HAS_AGENTID() Determine if AGENTID has a value

instanceArn

Amazon Connect instance ARN

Accessible with the following methods

Method Description
GET_INSTANCEARN() Getter for INSTANCEARN, with configurable default
ASK_INSTANCEARN() Getter for INSTANCEARN w/ exceptions if field has no value
HAS_INSTANCEARN() Determine if INSTANCEARN has a value

contactId

Amazon Connect contact identifier

Accessible with the following methods

Method Description
GET_CONTACTID() Getter for CONTACTID, with configurable default
ASK_CONTACTID() Getter for CONTACTID w/ exceptions if field has no value
HAS_CONTACTID() Determine if CONTACTID has a value

initialContactId

Amazon Connect contact identifier

Accessible with the following methods

Method Description
GET_INITIALCONTACTID() Getter for INITIALCONTACTID, with configurable default
ASK_INITIALCONTACTID() Getter for INITIALCONTACTID w/ exceptions if field has no va
HAS_INITIALCONTACTID() Determine if INITIALCONTACTID has a value

sessionName

Session name

Accessible with the following methods

Method Description
GET_SESSIONNAME() Getter for SESSIONNAME, with configurable default
ASK_SESSIONNAME() Getter for SESSIONNAME w/ exceptions if field has no value
HAS_SESSIONNAME() Determine if SESSIONNAME has a value

aiAgentArn

AI agent ARN

Accessible with the following methods

Method Description
GET_AIAGENTARN() Getter for AIAGENTARN, with configurable default
ASK_AIAGENTARN() Getter for AIAGENTARN w/ exceptions if field has no value
HAS_AIAGENTARN() Determine if AIAGENTARN has a value

aiAgentType

AI agent type

Accessible with the following methods

Method Description
GET_AIAGENTTYPE() Getter for AIAGENTTYPE, with configurable default
ASK_AIAGENTTYPE() Getter for AIAGENTTYPE w/ exceptions if field has no value
HAS_AIAGENTTYPE() Determine if AIAGENTTYPE has a value

aiAgentName

AI agent name

Accessible with the following methods

Method Description
GET_AIAGENTNAME() Getter for AIAGENTNAME, with configurable default
ASK_AIAGENTNAME() Getter for AIAGENTNAME w/ exceptions if field has no value
HAS_AIAGENTNAME() Determine if AIAGENTNAME has a value

aiAgentId

AI agent identifier

Accessible with the following methods

Method Description
GET_AIAGENTID() Getter for AIAGENTID, with configurable default
ASK_AIAGENTID() Getter for AIAGENTID w/ exceptions if field has no value
HAS_AIAGENTID() Determine if AIAGENTID has a value

aiAgentVersion

AI agent version number

Accessible with the following methods

Method Description
GET_AIAGENTVERSION() Getter for AIAGENTVERSION, with configurable default
ASK_AIAGENTVERSION() Getter for AIAGENTVERSION w/ exceptions if field has no valu
HAS_AIAGENTVERSION() Determine if AIAGENTVERSION has a value

aiAgentInvoker

Entity that invoked the AI agent

Accessible with the following methods

Method Description
GET_AIAGENTINVOKER() Getter for AIAGENTINVOKER, with configurable default
ASK_AIAGENTINVOKER() Getter for AIAGENTINVOKER w/ exceptions if field has no valu
HAS_AIAGENTINVOKER() Determine if AIAGENTINVOKER has a value

aiAgentOrchestratorUseCase

AI agent orchestrator use case

Accessible with the following methods

Method Description
GET_AIAGORCHESTRATORUSECASE() Getter for AIAGENTORCHESTRATORUSECASE, with configurable def
ASK_AIAGORCHESTRATORUSECASE() Getter for AIAGENTORCHESTRATORUSECASE w/ exceptions if field
HAS_AIAGORCHESTRATORUSECASE() Determine if AIAGENTORCHESTRATORUSECASE has a value

requestModel

LLM model ID for request (e.g., anthropic.claude-3-sonnet)

Accessible with the following methods

Method Description
GET_REQUESTMODEL() Getter for REQUESTMODEL, with configurable default
ASK_REQUESTMODEL() Getter for REQUESTMODEL w/ exceptions if field has no value
HAS_REQUESTMODEL() Determine if REQUESTMODEL has a value

requestMaxTokens

Maximum tokens configured for generation

Accessible with the following methods

Method Description
GET_REQUESTMAXTOKENS() Getter for REQUESTMAXTOKENS, with configurable default
ASK_REQUESTMAXTOKENS() Getter for REQUESTMAXTOKENS w/ exceptions if field has no va
HAS_REQUESTMAXTOKENS() Determine if REQUESTMAXTOKENS has a value

temperature

Sampling temperature for generation

Accessible with the following methods

Method Description
GET_TEMPERATURE() Getter for TEMPERATURE, with configurable default
ASK_TEMPERATURE() Getter for TEMPERATURE w/ exceptions if field has no value
STR_TEMPERATURE() String format for TEMPERATURE, with configurable default
HAS_TEMPERATURE() Determine if TEMPERATURE has a value

topP

Top-p sampling parameter for generation

Accessible with the following methods

Method Description
GET_TOPP() Getter for TOPP, with configurable default
ASK_TOPP() Getter for TOPP w/ exceptions if field has no value
STR_TOPP() String format for TOPP, with configurable default
HAS_TOPP() Determine if TOPP has a value

responseModel

Actual model used for response (usually matches requestModel)

Accessible with the following methods

Method Description
GET_RESPONSEMODEL() Getter for RESPONSEMODEL, with configurable default
ASK_RESPONSEMODEL() Getter for RESPONSEMODEL w/ exceptions if field has no value
HAS_RESPONSEMODEL() Determine if RESPONSEMODEL has a value

responseFinishReasons

Generation termination reasons (e.g., stop, max_tokens)

Accessible with the following methods

Method Description
GET_RESPONSEFINISHREASONS() Getter for RESPONSEFINISHREASONS, with configurable default
ASK_RESPONSEFINISHREASONS() Getter for RESPONSEFINISHREASONS w/ exceptions if field has
HAS_RESPONSEFINISHREASONS() Determine if RESPONSEFINISHREASONS has a value

usageInputTokens

Number of input tokens in prompt

Accessible with the following methods

Method Description
GET_USAGEINPUTTOKENS() Getter for USAGEINPUTTOKENS, with configurable default
ASK_USAGEINPUTTOKENS() Getter for USAGEINPUTTOKENS w/ exceptions if field has no va
HAS_USAGEINPUTTOKENS() Determine if USAGEINPUTTOKENS has a value

usageOutputTokens

Number of output tokens in response

Accessible with the following methods

Method Description
GET_USAGEOUTPUTTOKENS() Getter for USAGEOUTPUTTOKENS, with configurable default
ASK_USAGEOUTPUTTOKENS() Getter for USAGEOUTPUTTOKENS w/ exceptions if field has no v
HAS_USAGEOUTPUTTOKENS() Determine if USAGEOUTPUTTOKENS has a value

usageTotalTokens

Total tokens consumed (input + output)

Accessible with the following methods

Method Description
GET_USAGETOTALTOKENS() Getter for USAGETOTALTOKENS, with configurable default
ASK_USAGETOTALTOKENS() Getter for USAGETOTALTOKENS w/ exceptions if field has no va
HAS_USAGETOTALTOKENS() Determine if USAGETOTALTOKENS has a value

cacheReadInputTokens

Number of input tokens that were retrieved from cache

Accessible with the following methods

Method Description
GET_CACHEREADINPUTTOKENS() Getter for CACHEREADINPUTTOKENS, with configurable default
ASK_CACHEREADINPUTTOKENS() Getter for CACHEREADINPUTTOKENS w/ exceptions if field has n
HAS_CACHEREADINPUTTOKENS() Determine if CACHEREADINPUTTOKENS has a value

cacheWriteInputTokens

Number of input tokens that were written to cache in this request

Accessible with the following methods

Method Description
GET_CACHEWRITEINPUTTOKENS() Getter for CACHEWRITEINPUTTOKENS, with configurable default
ASK_CACHEWRITEINPUTTOKENS() Getter for CACHEWRITEINPUTTOKENS w/ exceptions if field has
HAS_CACHEWRITEINPUTTOKENS() Determine if CACHEWRITEINPUTTOKENS has a value

inputMessages

Input message collection sent to LLM

Accessible with the following methods

Method Description
GET_INPUTMESSAGES() Getter for INPUTMESSAGES, with configurable default
ASK_INPUTMESSAGES() Getter for INPUTMESSAGES w/ exceptions if field has no value
HAS_INPUTMESSAGES() Determine if INPUTMESSAGES has a value

outputMessages

Output message collection received from LLM

Accessible with the following methods

Method Description
GET_OUTPUTMESSAGES() Getter for OUTPUTMESSAGES, with configurable default
ASK_OUTPUTMESSAGES() Getter for OUTPUTMESSAGES w/ exceptions if field has no valu
HAS_OUTPUTMESSAGES() Determine if OUTPUTMESSAGES has a value

systemInstructions

System prompt instructions

Accessible with the following methods

Method Description
GET_SYSTEMINSTRUCTIONS() Getter for SYSTEMINSTRUCTIONS, with configurable default
ASK_SYSTEMINSTRUCTIONS() Getter for SYSTEMINSTRUCTIONS w/ exceptions if field has no
HAS_SYSTEMINSTRUCTIONS() Determine if SYSTEMINSTRUCTIONS has a value

promptArn

AI prompt ARN

Accessible with the following methods

Method Description
GET_PROMPTARN() Getter for PROMPTARN, with configurable default
ASK_PROMPTARN() Getter for PROMPTARN w/ exceptions if field has no value
HAS_PROMPTARN() Determine if PROMPTARN has a value

promptId

AI prompt identifier

Accessible with the following methods

Method Description
GET_PROMPTID() Getter for PROMPTID, with configurable default
ASK_PROMPTID() Getter for PROMPTID w/ exceptions if field has no value
HAS_PROMPTID() Determine if PROMPTID has a value

promptType

AI prompt type

Accessible with the following methods

Method Description
GET_PROMPTTYPE() Getter for PROMPTTYPE, with configurable default
ASK_PROMPTTYPE() Getter for PROMPTTYPE w/ exceptions if field has no value
HAS_PROMPTTYPE() Determine if PROMPTTYPE has a value

promptName

AI prompt name

Accessible with the following methods

Method Description
GET_PROMPTNAME() Getter for PROMPTNAME, with configurable default
ASK_PROMPTNAME() Getter for PROMPTNAME w/ exceptions if field has no value
HAS_PROMPTNAME() Determine if PROMPTNAME has a value

promptVersion

AI prompt version number

Accessible with the following methods

Method Description
GET_PROMPTVERSION() Getter for PROMPTVERSION, with configurable default
ASK_PROMPTVERSION() Getter for PROMPTVERSION w/ exceptions if field has no value
HAS_PROMPTVERSION() Determine if PROMPTVERSION has a value

timeToFirstTokenMs

Time to first token in milliseconds, measured from when Amazon Bedrock was invoked to when the first token was returned

Accessible with the following methods

Method Description
GET_TIMETOFIRSTTOKENMS() Getter for TIMETOFIRSTTOKENMS, with configurable default
ASK_TIMETOFIRSTTOKENMS() Getter for TIMETOFIRSTTOKENMS w/ exceptions if field has no
HAS_TIMETOFIRSTTOKENMS() Determine if TIMETOFIRSTTOKENMS has a value

guardrailAssessments

Guardrail assessments for the inference span. Absent on other span types and when no AI Guardrail is attached to the AI Agent.

Accessible with the following methods

Method Description
GET_GUARDRAILASSESSMENTS() Getter for GUARDRAILASSESSMENTS, with configurable default
ASK_GUARDRAILASSESSMENTS() Getter for GUARDRAILASSESSMENTS w/ exceptions if field has n
HAS_GUARDRAILASSESSMENTS() Determine if GUARDRAILASSESSMENTS has a value