Values.SpanAttributesSourceContextual attributes capturing operation details, LLM configuration, usage metrics, and conversation data
type nonrec t = {operationName : NonEmptyString.t option;Action being performed
*)providerName : NonEmptyString.t option;Model provider identifier (e.g., aws.bedrock)
*)errorType : NonEmptyString.t option;Error classification if span failed (e.g., throttle, timeout)
*)agentId : Uuid.t option;Amazon Connect agent ID
*)instanceArn : GenericArn.t option;Amazon Connect instance ARN
*)contactId : Uuid.t option;Amazon Connect contact identifier
*)initialContactId : Uuid.t option;Amazon Connect contact identifier
*)sessionName : NonEmptyString.t option;Session name
*)aiAgentArn : ArnWithQualifier.t option;AI agent ARN
*)aiAgentType : AIAgentType.t option;AI agent type
*)aiAgentName : Name.t option;AI agent name
*)aiAgentId : Uuid.t option;AI agent identifier
*)aiAgentVersion : Integer.t option;AI agent version number
*)aiAgentInvoker : NonEmptyString.t option;Entity that invoked the AI agent
*)aiAgentOrchestratorUseCase : NonEmptyString.t option;AI agent orchestrator use case
*)requestModel : NonEmptyString.t option;LLM model ID for request (e.g., anthropic.claude-3-sonnet)
*)requestMaxTokens : Integer.t option;Maximum tokens configured for generation
*)temperature : SpanAttributesTemperatureFloat.t option;Sampling temperature for generation
*)topP : SpanAttributesTopPFloat.t option;Top-p sampling parameter for generation
*)responseModel : NonEmptyString.t option;Actual model used for response (usually matches requestModel)
*)responseFinishReasons : SpanFinishReasonList.t option;Generation termination reasons (e.g., stop, max_tokens)
*)usageInputTokens : Integer.t option;Number of input tokens in prompt
*)usageOutputTokens : Integer.t option;Number of output tokens in response
*)usageTotalTokens : Integer.t option;Total tokens consumed (input + output)
*)cacheReadInputTokens : Integer.t option;Number of input tokens that were retrieved from cache
*)cacheWriteInputTokens : Integer.t option;Number of input tokens that were written to cache in this request
*)inputMessages : SpanMessageList.t option;Input message collection sent to LLM
*)outputMessages : SpanMessageList.t option;Output message collection received from LLM
*)systemInstructions : SpanMessageValueList.t option;System prompt instructions
*)promptArn : ArnWithQualifier.t option;AI prompt ARN
*)promptId : Uuid.t option;AI prompt identifier
*)promptType : AIPromptType.t option;AI prompt type
*)promptName : Name.t option;AI prompt name
*)promptVersion : Integer.t option;AI prompt version number
*)timeToFirstTokenMs : Integer.t option;Time to first token in milliseconds, measured from when Amazon Bedrock was invoked to when the first token was returned
*)}val make :
?operationName:??? ->
?providerName:??? ->
?errorType:??? ->
?agentId:??? ->
?instanceArn:??? ->
?contactId:??? ->
?initialContactId:??? ->
?sessionName:??? ->
?aiAgentArn:??? ->
?aiAgentType:??? ->
?aiAgentName:??? ->
?aiAgentId:??? ->
?aiAgentVersion:??? ->
?aiAgentInvoker:??? ->
?aiAgentOrchestratorUseCase:??? ->
?requestModel:??? ->
?requestMaxTokens:??? ->
?temperature:??? ->
?topP:??? ->
?responseModel:??? ->
?responseFinishReasons:??? ->
?usageInputTokens:??? ->
?usageOutputTokens:??? ->
?usageTotalTokens:??? ->
?cacheReadInputTokens:??? ->
?cacheWriteInputTokens:??? ->
?inputMessages:??? ->
?outputMessages:??? ->
?systemInstructions:??? ->
?promptArn:??? ->
?promptId:??? ->
?promptType:??? ->
?promptName:??? ->
?promptVersion:??? ->
?timeToFirstTokenMs:??? ->
unit ->
t