Lesson 1 of 5 Observability for Generative AI and Agents

Observing Generative AI Applications with CloudWatch

This lesson explains Amazon CloudWatch generative AI observability, which gives one place to see model calls, tokens, latency and the steps of agents and RAG pipelines.

Learning outcomes

After completing this lesson, you will be able to:

  • Describe the prebuilt generative AI observability views.
  • Identify the data sources behind them.
  • Track key signals such as tokens and latency.

What it provides

CloudWatch generative AI observability, generally available since October 2025, offers prebuilt dashboards for model invocations, showing invocation counts, token usage, latency and error rates by model, and an AgentCore view for agents with sessions, traces, reasoning steps, tool usage and errors. It provides end-to-end tracing across models, knowledge bases and tools, using OpenTelemetry, and works with agents built on AgentCore, Strands Agents, LangChain and LangGraph. There is no extra charge for the feature itself; standard CloudWatch pricing applies to the telemetry.

Data sources

The views draw on Bedrock runtime metrics in CloudWatch (Invocations, InvocationLatency, InvocationClientErrors, InvocationServerErrors, InvocationThrottles, InputTokenCount, OutputTokenCount), on Bedrock model invocation logging, which writes full requests and responses to CloudWatch Logs or S3, and on traces from AgentCore Observability or OpenTelemetry instrumentation. Integrations with CloudWatch Application Signals, alarms, Logs Insights and data protection policies let teams alert on and investigate generative AI behaviour like any other workload.

True or false

Where the data comes from

Exam skills 4.1.1

Check what feeds CloudWatch generative AI observability.

Log in to try this activity Interactive activities are free with an account.

Key signals

Generative AI applications need signals beyond those of traditional services. Token counts drive cost and reveal growing prompts; latency, especially time to the first token, drives user experience; throttles show that quotas are being reached; and errors, guardrail interventions and the outcomes of tool calls show whether answers are correct and safe. The following table lists the main signals and what they indicate.

SignalIndicates
InvocationThrottlesQuota or capacity limits reached
InvocationLatency (and time to first token)Model or prompt size effects on responsiveness
Input and output token countsCost drivers and prompt growth
Client and server errorsBad requests or service-side failures
Trace spans per stepWhich model, retrieval or tool call is slow or failing

The following diagram shows how input tokens grew with each turn of a long chat session, and the effect of the fix.

Tokens per invocation in a long chat session. Because the whole conversation history was appended to every prompt, input tokens grew with each turn while output tokens stayed flat, doubling latency and raising the bill 70% with flat user numbers. Summarising the history after ten turns and caching the system prompt keeps input tokens bounded.
The curves are schematic.
Match the pairs

Generative AI signals

Exam skills 4.1.1 · 4.2.2

Match each Bedrock metric with what it tells you.

Log in to try this activity Interactive activities are free with an account.
Worked example

Rising latency and cost

Over a month, a chat assistant's average latency doubles and the Bedrock bill rises 70% with flat user numbers.

The generative AI observability dashboard shows input tokens per invocation rising steadily while output tokens are stable. Traces show that conversation history is appended without limit, so long sessions send ever-larger prompts. Summarizing history after ten turns and enabling prompt caching for the system prompt restores latency and cost. Without per-invocation token metrics, the cause would have been hard to see in the bill alone.

Check yourself

Which feature records full Bedrock prompts and responses?

Show answer

Bedrock model invocation logging.

Exam Tips

Remember for the exam

  • Token usage, latency and errors of model calls: CloudWatch generative AI observability.
  • End-to-end traces across agents, tools and knowledge bases: generative AI observability with AgentCore.
  • Full prompts and responses: Bedrock model invocation logging.
  • Throttling: InvocationThrottles metric.
  • Rising input tokens often mean prompts or histories are growing.