
Tracing Amazon Bedrock Agents
Sending Bedrock trace data to Amazon X-Ray
parent_id
field to indicate the order of the segments in the overall execution.


- At the time of writing, the traces do not contain the start and end times, so we just use the current timestamp for the start of the first segment, and set the end to the start plus 5 seconds. Each subsequent segment should have a start time equal to the previous segment's end time plus 1 second. We can fix this once Bedrock provides the start and end times.
- We are not yet handling all the possible types of traces.
- We didn't enable tracing in the Lambda functions called as tools in the action groups.
- Using the higher-level X-Ray SDK would let us capture more segments from other AWS services as part of a single logical trace.
Any opinions in this post are those of the individual author and may not reflect the opinions of AWS.