သဘောတရား
Agent monitoring and AgentCore Observability
Traces show each reasoning step and tool call, so you can find loops, failing tools and handoffs that went wrong.
ဒီသင်ခန်းစာကို မြန်မာဘာသာ မပြန်ရသေးလို့ အင်္ဂလိပ်လို ပြထားပါတယ်။
Tool failure
- Look for
- Error span under a tool call
- Fix
- Fix the tool, add retries with backoff
Loop
- Look for
- Same steps repeating
- Fix
- Cap steps and session time
Wrong handoff
- Look for
- Task sent to the wrong agent
- Fix
- Clearer agent roles and routing
Truncated stream
- Look for
- Response ends early
- Fix
- Raise max tokens or timeout
High cost
- Look for
- Tokens and compute per session
- Fix
- Trim context, cap steps
| Symptom | Look for | Fix |
|---|---|---|
| Tool failure | Error span under a tool call | Fix the tool, add retries with backoff |
| Loop | Same steps repeating | Cap steps and session time |
| Wrong handoff | Task sent to the wrong agent | Clearer agent roles and routing |
| Truncated stream | Response ends early | Raise max tokens or timeout |
| High cost | Tokens and compute per session | Trim context, cap steps |
1 / 2
Tool failure
- Look for
- Error span under a tool call
- Fix
- Fix the tool, add retries with backoff
Loop
- Look for
- Same steps repeating
- Fix
- Cap steps and session time
Wrong handoff
- Look for
- Task sent to the wrong agent
- Fix
- Clearer agent roles and routing
| Symptom | Look for | Fix |
|---|---|---|
| Tool failure | Error span under a tool call | Fix the tool, add retries with backoff |
| Loop | Same steps repeating | Cap steps and session time |
| Wrong handoff | Task sent to the wrong agent | Clearer agent roles and routing |
2 / 2
Truncated stream
- Look for
- Response ends early
- Fix
- Raise max tokens or timeout
High cost
- Look for
- Tokens and compute per session
- Fix
- Trim context, cap steps
| Symptom | Look for | Fix |
|---|---|---|
| Truncated stream | Response ends early | Raise max tokens or timeout |
| High cost | Tokens and compute per session | Trim context, cap steps |
ဘာလဲ
An agent is a chain of decisions: think, call a tool, read the result, think again. One user request can mean many model calls, so a single latency number hides the problem. Traces show each step. Amazon Bedrock AgentCore Observability records the execution path in an OpenTelemetry-compatible format and stores metrics, spans and logs in Amazon CloudWatch. Metrics arrive by default for agents, gateways and memory: session count, latency, duration, token use, errors and throttles. Spans and logs need to be switched on. Trace views need a one-time setup of CloudWatch Transaction Search, which stores the spans. Dashboards sit in CloudWatch generative AI observability.
ဘာလဲ
Read traces for failure patterns. A tool failure shows as an error span under a tool call, and a retry shows as the same call repeated. A loop shows as the same steps repeating while session time and tokens climb: cap the number of steps and the session time. A coordination failure between agents shows as a handoff to the wrong agent, no handoff at all, or two agents passing a task back and forth. Truncated streaming shows as a response that ends early: check for a max_tokens stop reason, a timeout, or a client that disconnected.
ဘာလဲ
Resource use matters for cost. AgentCore Runtime publishes CPU and memory use as vCPU-hours and GB-hours per agent, and can write usage logs per session. These logs can lag and are for monitoring, so use the bill for exact charges. Alarm on errors, throttles and latency, and use session-level token counts to spot the sessions that cost the most.
မှတ်ထားရန်
- AgentCore Observability: OpenTelemetry-compatible data stored in CloudWatch.
- Metrics are on by default. Spans and logs need to be enabled.
- Turn on CloudWatch Transaction Search once to see traces.
- Loops: repeated steps with rising time and tokens. Cap steps and time.
- Tool failures and retries show as error spans and repeated calls.
မှတ်ထားရန်
- Per-session token, CPU and memory use point at costly sessions.
စာမေးပွဲမှာ
- “See each reasoning step and tool call of an agent” points to AgentCore Observability traces.
- “Agent keeps calling the same tool” points to a loop: cap the iterations and alarm on session duration.
- “Find which sessions use the most tokens or compute” points to per-session metrics and usage logs.
- “Agent hands a task to the wrong agent” points to a coordination failure found in the trace.
ဒါတွေနဲ့ မရောပါနဲ့
- CloudWatch generative AI observability and Bedrock metricsBedrock sends runtime metrics to CloudWatch on its own. Invocation logs need setup, and the dashboards read both.
- Monitoring FM quality in productionInfrastructure metrics cannot tell if answers are good. Sample live traffic, score it, and alarm on the scores.
- Logs and tracing to troubleshoot ML systemsRead the signal first: logs for container errors, traces for slow hops, CloudTrail for denied or failed API calls.